Represents a special container to hold key-value pairs, similar to an associative array.
A value map is set of name-value pairs defined for a ShaderDef, a ShaderParamDef, a ShaderArrayParamDef, or a MetaShaderRendererDef. This is the equivalent of a dictionary or associative array.
#include <xsi_valuemap.h>
Public Member Functions |
|
ValueMap () | |
~ValueMap () | |
ValueMap (const CRef &in_ref) | |
ValueMap (const ValueMap &in_obj) | |
bool | IsA (siClassID in_ClassID) const |
siClassID | GetClassID () const |
ValueMap & | operator= (const ValueMap &in_obj) |
ValueMap & | operator= (const CRef &in_ref) |
CValue | Get (const CString &in_name) const |
CStatus | GetAll (CValueArray &out_names, CValueArray &out_values) const |
CStatus | Remove (const CString &in_name) |
CStatus | Set (const CString &in_name, const CValue &in_value) |
ValueMap | ( | ) |
Default constructor.
~ValueMap | ( | ) |
Default destructor.
bool IsA | ( | siClassID | in_ClassID | ) | const [virtual] |
Returns true if a given class type is compatible with this API class.
in_ClassID | class type. |
Reimplemented from SIObject.
siClassID GetClassID | ( | ) | const [virtual] |
Creates an object from another object. The newly created object is set to empty if the input object is not compatible.
in_obj | constant class object. |
Returns the value that matches the specified name.
in_name | the name of the value to retrieve. |
CStatus GetAll | ( | CValueArray & | out_names, |
CValueArray & | out_values | ||
) | const |
Returns the lists of all names and all values defined in this ValueMap in two separate output arrays.
out_names | array of names |
out_values | array of values |
Removes the value that matches the specified name. If no item matches that name, nothing happens.
in_name | The name of the value to remove. |
Sets the value that matches the specified name. If no entry exists matching this name, it automatically adds the name-value pair. If an entry matching that name already exists, the value is updated.
in_name | The name of the value to set. |
in_value | The value to set. |