The interface for creating values. More...
Public Member Functions | |
virtual IType_factory * | get_type_factory () const =0 |
Returns the type factory associated with this value factory. More... | |
virtual IValue_bool * | create_bool (bool value=false) const =0 |
Creates a new value of type boolean. More... | |
virtual IValue_int * | create_int (Sint32 value=0) const =0 |
Creates a new value of type integer. More... | |
virtual IValue_enum * | create_enum (const IType_enum *type, Size index=0) const =0 |
Creates a new value of type enum, or returns NULL in case of errors. More... | |
virtual IValue_float * | create_float (Float32 value=0.0f) const =0 |
Creates a new value of type float. More... | |
virtual IValue_double * | create_double (Float64 value=0.0) const =0 |
Creates a new value of type double. More... | |
virtual IValue_string * | create_string (const char *value="") const =0 |
Creates a new value of type string. More... | |
virtual IValue_vector * | create_vector (const IType_vector *type) const =0 |
Creates a new value of type vector, or returns NULL in case of errors. More... | |
virtual IValue_matrix * | create_matrix (const IType_matrix *type) const =0 |
Creates a new value of type matrix, or returns NULL in case of errors. More... | |
virtual IValue_color * | create_color (Float32 red=0.0f, Float32 green=0.0f, Float32 blue=0.0f) const =0 |
Creates a new value of type color. More... | |
virtual IValue_array * | create_array (const IType_array *type) const =0 |
Creates a new value of type array, or returns NULL in case of errors. More... | |
virtual IValue_struct * | create_struct (const IType_struct *type) const =0 |
Creates a new value of type struct, or returns NULL in case of errors. More... | |
virtual IValue_texture * | create_texture (const IType_texture *type, const char *value) const =0 |
Creates a new texture value, or returns NULL in case of errors. More... | |
virtual IValue_light_profile * | create_light_profile (const char *value) const =0 |
Creates a new light profile value, or returns NULL in case of errors. More... | |
virtual IValue_bsdf_measurement * | create_bsdf_measurement (const char *value) const =0 |
Creates a new BSDF measurement value, or returns NULL in case of errors. More... | |
virtual IValue_invalid_df * | create_invalid_df (const IType_reference *type) const =0 |
Creates a new invalid distribution function value. More... | |
virtual IValue * | create (const IType *type) const =0 |
Creates a default-constructed value of the given type. More... | |
template<class T > | |
T * | create (const IType *type) const |
Creates a default-constructed value of the given type. More... | |
virtual IValue_list * | create_value_list () const =0 |
Creates a new value list. More... | |
virtual IValue * | clone (const IValue *value) const =0 |
Clones the given value. More... | |
template<class T > | |
T * | clone (const T *value) const |
Clones the given value. More... | |
virtual IValue_list * | clone (const IValue_list *value_list) const =0 |
Clones the given value list. More... | |
virtual Sint32 | compare (const IValue *lhs, const IValue *rhs) const =0 |
Compares two instances of mi::neuraylib::IValue. More... | |
virtual Sint32 | compare (const IValue_list *lhs, const IValue_list *rhs) const =0 |
Compares two instances of mi::neuraylib::IValue_list. More... | |
virtual const IString * | dump (const IValue *value, const char *name, Size depth=0) const =0 |
Returns a textual representation of a value. More... | |
virtual const IString * | dump (const IValue_list *list, const char *name, Size depth=0) const =0 |
Returns a textual representation of a value list. More... | |
Additional Inherited Members | |
![]() | |
typedef Interface_declare< id1, id2, id3, id4, id5, id6, id7, id8, id9, id10, id11, IInterface > | Self |
Own type. More... | |
typedef Uuid_t< id1, id2, id3, id4, id5, id6, id7, id8, id9, id10, id11 > | IID |
Declares the interface ID (IID) of this interface. More... | |
![]() | |
static bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface and of its ancestors. More... | |
The interface for creating values.
A value factory can be obtained from mi::neuraylib::IMdl_factory::create_value_factory().
Clones the given value.
Note that referenced DB elements, e.g., resources, are not copied, but shared.
|
inline |
Clones the given value.
Note that referenced DB elements, e.g., resources, are not copied, but shared.
|
pure virtual |
Clones the given value list.
Note that referenced DB elements, e.g., resources, are not copied, but shared.
|
pure virtual |
Compares two instances of mi::neuraylib::IValue.
The comparison operator for instances of mi::neuraylib::IValue is defined as follows:
lhs
or rhs
is NULL
, the result is the lexicographic comparison of the pointer addresses themselves.lhs
and rhs
are compared. If they are different, the result is determined by that comparison.operator<
on the mi::neuraylib::IValue::Kind values.operator<
or strcmp()
, with the exception of enums, for which the indices rather than the values are compared.operator<
(the compound size might be different for dynamic arrays). If both compounds are of equal size, the compounds elements are compared in lexicographic order.strcmp()
.lhs | The left-hand side operand for the comparison. |
rhs | The right-hand side operand for the comparison. |
lhs
< rhs
, 0 if lhs
== rhs
, and +1 if lhs
> rhs
.
|
pure virtual |
Compares two instances of mi::neuraylib::IValue_list.
The comparison operator for instances of mi::neuraylib::IValue_list is defined as follows:
lhs
or rhs
is NULL
, the result is the lexicographic comparison of the pointer addresses themselves.operator<()
.strcmp()
.lhs | The left-hand side operand for the comparison. |
rhs | The right-hand side operand for the comparison. |
lhs
< rhs
, 0 if lhs
== rhs
, and +1 if lhs
> rhs
. Creates a default-constructed value of the given type.
|
inline |
Creates a default-constructed value of the given type.
|
pure virtual |
Creates a new value of type array, or returns NULL
in case of errors.
|
pure virtual |
Creates a new value of type boolean.
|
pure virtual |
Creates a new BSDF measurement value, or returns NULL
in case of errors.
|
pure virtual |
Creates a new value of type color.
|
pure virtual |
Creates a new value of type double.
|
pure virtual |
Creates a new value of type enum, or returns NULL
in case of errors.
|
pure virtual |
Creates a new value of type float.
|
pure virtual |
Creates a new value of type integer.
|
pure virtual |
Creates a new invalid distribution function value.
|
pure virtual |
Creates a new light profile value, or returns NULL
in case of errors.
|
pure virtual |
Creates a new value of type matrix, or returns NULL
in case of errors.
|
pure virtual |
Creates a new value of type string.
value | The value NULL is handled like the empty string. |
|
pure virtual |
Creates a new value of type struct, or returns NULL
in case of errors.
|
pure virtual |
Creates a new texture value, or returns NULL
in case of errors.
|
pure virtual |
Creates a new value list.
|
pure virtual |
Creates a new value of type vector, or returns NULL
in case of errors.
|
pure virtual |
Returns a textual representation of a value.
The textual representation is of the form "type name = value" if name
is not NULL
, and of the form "value" if name
is NULL
. The representation of the value might contain line breaks, for example for structures, enums, and arrays. Subsequent lines have a suitable indentation. The assumed indentation level of the first line is specified by depth
.
|
pure virtual |
Returns a textual representation of a value list.
The representation of the value list will contain line breaks. Subsequent lines have a suitable indentation. The assumed indentation level of the first line is specified by depth
.
|
pure virtual |
Returns the type factory associated with this value factory.