Public Member Functions
ShaderArrayParamDef Class Reference

Detailed Description

Represents a definition for a shader parameter (an instance a ShaderArrayParameter object).

This class allows you to set and get the array elements contained by this shader parameter via ShaderArrayParamDef::GetItemInitialValues, which returns a ValueMap object that you can populate or query.

To create a ShaderArrayParamDef object, use the ShaderParamDefContainer::AddArrayParamDef method when adding a new parameter definition to the shader parameter definition container.

See also:
ShaderParamDefContainer::AddParamDef, ShaderParamDefContainer::AddArrayParamDef, ShaderParameter::GetDefinition, ShaderParamDefContainer, ShaderStructParamDef, ShaderDefinitions/netview_ShaderDefs Color Sampler example
Since:
9.0 (2011)

#include <xsi_shaderarrayparamdef.h>

Inheritance diagram for ShaderArrayParamDef:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  ShaderArrayParamDef ()
  ~ShaderArrayParamDef ()
  ShaderArrayParamDef (const CRef &in_ref)
  ShaderArrayParamDef (const ShaderArrayParamDef &in_obj)
bool  IsA (siClassID in_ClassID) const
siClassID  GetClassID () const
ShaderArrayParamDef operator= (const ShaderArrayParamDef &in_obj)
ShaderArrayParamDef operator= (const CRef &in_ref)
ShaderParamDef  GetItemDef () const
ULONG  GetItemInitialCount () const
CStatus  PutItemInitialCount (ULONG in_count)
ValueMap  GetItemInitialValues () const
CString  GetItemName () const
CStatus  PutItemName (const CString &in_name)
bool  GetStaticArray () const
CStatus  PutStaticArray (bool in_static)

Constructor & Destructor Documentation

Default constructor.

Default destructor.

ShaderArrayParamDef ( const CRef in_ref )

Constructor.

Parameters:
in_ref constant reference object.

Copy constructor.

Parameters:
in_obj constant class object.

Member Function Documentation

bool IsA ( siClassID  in_ClassID ) const [virtual]

Returns true if a given class type is compatible with this API class.

Parameters:
in_ClassID class type.
Returns:
true if the class is compatible, false otherwise.

Reimplemented from ShaderParamDef.

siClassID GetClassID ( ) const [virtual]

Returns the type of the API class.

Returns:
The class type.

Reimplemented from ShaderParamDef.

ShaderArrayParamDef& operator= ( const ShaderArrayParamDef in_obj )

Creates an object from another object. The newly created object is set to empty if the input object is not compatible.

Parameters:
in_obj constant class object.
Returns:
The new ShaderArrayParamDef object.
Since:
9.0 (2011)
ShaderArrayParamDef& operator= ( const CRef in_ref )

Creates an object from a reference object. The newly created object is set to empty if the input reference object is not compatible.

Parameters:
in_ref constant class object.
Returns:
The new ShaderArrayParamDef object.
Since:
9.0 (2011)

Reimplemented from ShaderParamDef.

ShaderParamDef GetItemDef ( ) const

Returns the underlying ShaderParamDef or ShaderStructParamDef object for this array item.

You can use this when you want to query an existing shader definition to find out information about its parameter definitions. For example, if you are writing a tool to find a parameter defined as an array of booleans.

Returns:
the parameter definition for the array item.
See also:
ShaderArrayParameter
Since:
9.0 (2011)
ULONG GetItemInitialCount ( ) const

Returns number of array items that will be instantiated when the shader is connected.

Returns:
the array item's initial count.
See also:
ShaderArrayParamDef::GetItemName, ShaderArrayParamDef::PutItemName, ShaderArrayParamDef::PutItemName, ShaderArrayParamDef::GetItemInitialValues, ShaderArrayParameter
Since:
9.0 (2011)
CStatus PutItemInitialCount ( ULONG  in_count )

Sets the number of array items that will be instantiated when the shader is connected.

Parameters:
in_count the array item's initial count.
Returns:
Success/failure
See also:
ShaderArrayParamDef::GetItemName, ShaderArrayParamDef::PutItemName, ShaderArrayParamDef::PutItemName, ShaderArrayParamDef::GetItemInitialValues, ShaderArrayParameter
Since:
9.0 (2011)
ValueMap GetItemInitialValues ( ) const

Returns the array item's initial values as a ValueMap. These values will be instantiated on the array items by default when the shader is connected.

Returns:
the array item's initial values.
See also:
ShaderArrayParamDef::GetItemName, ShaderArrayParamDef::PutItemName, ShaderArrayParamDef::GetItemInitialCount, ShaderArrayParamDef::PutItemInitialCount, ShaderArrayParameter
Since:
9.0 (2011)
CString GetItemName ( ) const

Returns the array item's base name. When more than one array item based on this definition is instantiated, the base name is suffixed with an index ID. For example, if this property is set to "West", the first instance will be "West", the second will be "West[1]", the third "West[2]" and so on.

Note:
This function has no effect on the display name (see ShaderParamDef::GetDisplayName).
Returns:
the array item's name.
See also:
ShaderArrayParamDef::GetItemInitialCount, ShaderArrayParamDef::PutItemInitialCount, ShaderArrayParamDef::GetItemInitialValues, ShaderArrayParameter, SIObject::GetName, Parameter::GetScriptName
Since:
9.0 (2011)
CStatus PutItemName ( const CString in_name )

Sets the array item's base name. When more than one array item based on this definition is instantiated, the base name is suffixed with an index ID. For example, if this property is set to "West", the first instance will be "West", the second will be "West[1]", the third "West[2]" and so on.

Parameters:
in_name the Array Item's Name.
Returns:
Success/failure
See also:
ShaderArrayParamDef::GetItemInitialCount, ShaderArrayParamDef::PutItemInitialCount, ShaderArrayParamDef::GetItemInitialValues, ShaderArrayParameter, SIObject::GetName, Parameter::GetScriptName
Since:
9.0 (2011)
bool GetStaticArray ( ) const

Returns whether the array can be resized or not.

Returns:
false if the array can be resized
true otherwise
See also:
ShaderArrayParameter
Since:
9.0 (2011)
CStatus PutStaticArray ( bool  in_static )

Sets whether the array can be resized or not.

Parameters:
in_static true for static array; false for dynamic.
Returns:
Success/failure
See also:
ShaderArrayParameter
Since:
9.0 (2011)

The documentation for this class was generated from the following file: