Public Member Functions
ShaderParamDefContainer Class Reference

Detailed Description

Represents a set of ShaderParamDef, ShaderArrayParamDef, and/or ShaderStructParamDef objects.

This object allows you to manage the list of input and output parameters defined on a shader definition object (ShaderDef). Use this object to add and remove members and also access a CRefArray of ShaderParamDef objects (via the ShaderParamDefContainer::GetDefinitions member) to iterate over the list of parameters.

There are three functions which return a ShaderParamDefContainer:

See also:
ShaderDef::GetInputParamDefs, ShaderDef::GetOutputParamDefs, ShaderStructParamDef::GetSubParamDefs ShaderParamDef, ShaderDef, cus_shaders_Params Shader Parameter Definitions , ShaderDefinitions/netview_ShaderDefs Color Sampler example
Since:
9.0 (2011)

#include <xsi_shaderparamdefcontainer.h>

Inheritance diagram for ShaderParamDefContainer:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  ShaderParamDefContainer ()
  ~ShaderParamDefContainer ()
  ShaderParamDefContainer (const CRef &in_ref)
  ShaderParamDefContainer (const ShaderParamDefContainer &in_obj)
bool  IsA (siClassID in_ClassID) const
siClassID  GetClassID () const
ShaderParamDefContainer operator= (const ShaderParamDefContainer &in_obj)
ShaderParamDefContainer operator= (const CRef &in_ref)
ShaderParamDef  AddArrayParamDef (const CString &in_name, siShaderParameterDataType in_dataType, const ShaderParamDefOptions &in_options=CRef())
ShaderParamDef  AddArrayParamDef (const CString &in_name, const CString &in_dataType, const ShaderParamDefOptions &in_options=CRef())
ShaderParamDef  AddParamDef (const CString &in_name, siShaderParameterDataType in_dataType, const ShaderParamDefOptions &in_options=CRef())
ShaderParamDef  AddParamDef (const CString &in_name, const CString &in_dataType, const ShaderParamDefOptions &in_options=CRef())
CRefArray  GetDefinitions ()
ShaderParamDef  GetParamDefByName (const CString &in_parameterName)

Constructor & Destructor Documentation

Default constructor.

Default destructor.

ShaderParamDefContainer ( 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 SIObject.

siClassID GetClassID ( ) const [virtual]

Returns the type of the API class.

Returns:
The class type.

Reimplemented from SIObject.

ShaderParamDefContainer& operator= ( const ShaderParamDefContainer 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 ShaderParamDefContainer object.
Since:
9.0 (2011)
ShaderParamDefContainer& 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 ShaderParamDefContainer object.
Since:
9.0 (2011)

Reimplemented from SIObject.

ShaderParamDef AddArrayParamDef ( const CString in_name,
siShaderParameterDataType  in_dataType,
const ShaderParamDefOptions in_options = CRef() 
)

Adds a ShaderArrayParamDef to this container. The type of the new parameter must be one of the standard Softimage native data types.

Warning:
You must specify any characteristics such as display name, capabilities, value range, etc. for this parameter definition on the ShaderParamDefOptions object before calling this method.
Parameters:
in_name The registered name for the new parameter. On an instance of this parameter definition (ShaderParameter), this value will be returned when you call Parameter::GetScriptName.

To set the label you see in the UI for this parameter, use ShaderParamDefOptions::SetLongName.

To set the value returned by ShaderParamDef::GetDisplayName, use ShaderParamDefOptions::SetShortName.
in_dataType The type of shader parameter to create (one of the siShaderParameterDataType values).
in_options Options for this shader parameter definition. Use Factory::CreateShaderParamDefOptions to create the options as a ShaderParamDefOptions object.
Returns:
The new array parameter definition.
See also:
ShaderParamDefContainer::AddParamDef cus_shaders_ParamsAdding Adding Parameter Definitions
Since:
9.0 (2011)
ShaderParamDef AddArrayParamDef ( const CString in_name,
const CString in_dataType,
const ShaderParamDefOptions in_options = CRef() 
)

Adds a ShaderArrayParamDef to this container. The type of the new parameter can be one of the standard Softimage native data types or a custom data type.

Warning:
You must specify any characteristics such as display name, capabilities, value range, etc. for this parameter definition on the ShaderParamDefOptions object before calling this function.
Note:
This function can be used as a shorthand for adding parameter definitions using custom shader port types (see Application::RegisterShaderCustomParameterType).
Parameters:
in_name The registered name for the new parameter. On an instance of this parameter definition (ShaderParameter), this value will be returned when you call Parameter::GetScriptName.

To set the label you see in the UI for this parameter, use ShaderParamDefOptions::SetLongName.

To set the value returned by ShaderParamDef::GetDisplayName, use ShaderParamDefOptions::SetShortName.
in_dataType The type of shader parameter to create. This can be either the string version of any of the siShaderParameterDataType values or a custom data type that has been registered with Application::RegisterShaderCustomParameterType.
in_options Options for this shader parameter definition. Use Factory::CreateShaderParamDefOptions to create the options as a ShaderParamDefOptions object.
Returns:
The new array parameter definition.
See also:
ShaderParamDefContainer::AddParamDef cus_shaders_ParamsAdding Adding Parameter Definitions
Since:
9.0 (2011)
ShaderParamDef AddParamDef ( const CString in_name,
siShaderParameterDataType  in_dataType,
const ShaderParamDefOptions in_options = CRef() 
)

Adds a ShaderParamDef to this container. The type of the new parameter must be one of the standard Softimage native data types.

Warning:
You must specify any characteristics such as display name, capabilities, value range, etc. for this parameter definition on the ShaderParamDefOptions object before calling this function.
Parameters:
in_name The registered name for the new parameter. On an instance of this parameter definition (ShaderParameter), this value will be returned when you call Parameter::GetScriptName.

To set the label you see in the UI for this parameter, use ShaderParamDefOptions::SetLongName.

To set the value returned by ShaderParamDef::GetDisplayName, use ShaderParamDefOptions::SetShortName.
in_dataType The type of shader parameter to create (one of the siShaderParameterDataType values).
in_options Options for this shader parameter definition. Use Factory::CreateShaderParamDefOptions to create the options as a ShaderParamDefOptions object.
Returns:
The new parameter definition.
See also:
ShaderParamDefContainer::AddArrayParamDef cus_shaders_ParamsAdding Adding Parameter Definitions
Since:
9.0 (2011)
ShaderParamDef AddParamDef ( const CString in_name,
const CString in_dataType,
const ShaderParamDefOptions in_options = CRef() 
)

Adds a ShaderParamDef to this container. The type of the new parameter can be one of the standard Softimage native data types or a custom data type.

Warning:
You must specify any characteristics such as display name, capabilities, value range, etc. for this parameter definition on the ShaderParamDefOptions object before calling this function.
Note:
This function can be used as a shorthand for adding parameter definitions using custom shader port types (see Application::RegisterShaderCustomParameterType).
Parameters:
in_name The registered name for the new parameter. On an instance of this parameter definition (ShaderParameter), this value will be returned when you call Parameter::GetScriptName.

To set the label you see in the UI for this parameter, use ShaderParamDefOptions::SetLongName.

To set the value returned by ShaderParamDef::GetDisplayName, use ShaderParamDefOptions::SetShortName.
in_dataType The type of shader parameter to create. This can be either the string version of any of the siShaderParameterDataType values or a custom data type that has been registered with Application::RegisterShaderCustomParameterType.
in_options Options for this shader parameter definition. Use Factory::CreateShaderParamDefOptions to create the options as a ShaderParamDefOptions object.
Returns:
The new parameter definition.
See also:
ShaderParamDefContainer::AddArrayParamDef cus_shaders_ParamsAdding Adding Parameter Definitions
Since:
9.0 (2011)
CRefArray GetDefinitions ( )

Returns the list of all parameter definitions (ShaderParamDef objects) for this ShaderParamDefContainer object.

Returns:
CRefArray of ShaderParamDef objects
See also:
ShaderParamDefContainer::GetParamDefByName
Since:
9.0 (2011)
ShaderParamDef GetParamDefByName ( const CString in_parameterName )

Returns the ShaderParamDef that matches the specified name from this container. This is preferable to calling ShaderParamDefContainer::GetDefinitions(in_parameterName) if you don't need to iterate over the collection.

Parameters:
in_parameterName The registered name of the shader parameter definition to return.
Returns:
the matching ShaderParamDef
See also:
ShaderParamDefContainer::GetDefinitions
Since:
9.0 (2011)

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