The interface for creating values. More...
#include <ivalue.h>

Public Member Functions | |
Access to related factories. | |
| virtual IType_factory * | get_type_factory () const =0 |
| Returns the type factory associated with this value factory. More... | |
Creation of values and value lists | |
| 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 nullptr 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 nullptr 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 nullptr 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 nullptr 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 nullptr 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 nullptr 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 nullptr 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 nullptr 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 * | create (const IAnnotation *annotation) const =0 |
Creates a value observing the range of an "::anno::soft_range()" or an "::anno::hard_range()" annotation. More... | |
| template<class T> | |
| T * | create (const IAnnotation *annotation) const |
Creates a value observing the range of an "::anno::soft_range()" or an "::anno::hard_range()" annotation. More... | |
| virtual IValue * | create (const IType *type, const IAnnotation_block *annotation_block) const =0 |
| Creates a value observing a potentially present range annotation. More... | |
| template<class T> | |
| T * | create (const IType *type, const IAnnotation_block *annotation_block) const |
| Creates a value observing a potentially present range annotation. More... | |
| virtual IValue_list * | create_value_list () const =0 |
| Creates a new value list. More... | |
Cloning of values and value lists | |
| 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... | |
Comparison of values and value lists | |
| virtual Sint32 | compare (const IValue *lhs, const IValue *rhs, Float64 epsilon=0.0) const =0 |
| Compares two instances of mi::neuraylib::IValue. More... | |
| virtual Sint32 | compare (const IValue_list *lhs, const IValue_list *rhs, Float64 epsilon=0.0) const =0 |
| Compares two instances of mi::neuraylib::IValue_list. More... | |
Dumping of values and value lists | |
| 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... | |
Public Member Functions inherited from mi::base::IInterface | |
| virtual Uint32 | retain () const =0 |
| Increments the reference count. More... | |
| virtual Uint32 | release () const =0 |
| Decrements the reference count. More... | |
| virtual const IInterface * | get_interface (const Uuid &interface_id) const =0 |
| Acquires a const interface from another. More... | |
| template<class T> | |
| const T * | get_interface () const |
| Acquires a const interface from another. More... | |
| virtual IInterface * | get_interface (const Uuid &interface_id)=0 |
| Acquires a mutable interface from another. More... | |
| template<class T> | |
| T * | get_interface () |
| Acquires a mutable interface from another. More... | |
| virtual Uuid | get_iid () const =0 |
| Returns the interface ID of the most derived interface. More... | |
Additional Inherited Members | |
Public Types inherited from mi::base::Interface_declare< 0x82595c0d, ... > | |
| using | Self = Interface_declare< id1, ... > |
| Own type. More... | |
| using | IID = Uuid_t< id1, ... > |
| Declares the interface ID (IID) of this interface. More... | |
Public Types inherited from mi::base::IInterface | |
| using | IID = Uuid_t<0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0> |
| Declares the interface ID (IID) of this interface. More... | |
Static Public Member Functions inherited from mi::base::Interface_declare< 0x82595c0d, ... > | |
| static bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface and of its ancestors. More... | |
Static Public Member Functions inherited from mi::base::IInterface | |
| static bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface. 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.
|
pure virtual |
Clones the given value list.
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 |
Compares two instances of mi::neuraylib::IValue.
The comparison operator for instances of mi::neuraylib::IValue is defined as follows:
lhs or rhs is nullptr, 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 deferred-sized 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. |
| epsilon | Maximum difference for floating point values to consider them as equal. |
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 nullptr, 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. |
| epsilon | Maximum difference for floating point values to consider them as equal. |
lhs < rhs, 0 if lhs == rhs, and +1 if lhs > rhs.
|
inline |
Creates a value observing the range of an "::anno::soft_range()" or an "::anno::hard_range()" annotation.
The type of the value is determined by the parameter types of the annotation.
|
pure virtual |
Creates a value observing the range of an "::anno::soft_range()" or an "::anno::hard_range()" annotation.
The type of the value is determined by the parameter types of the annotation.
|
inline |
Creates a default-constructed value of the given type.
Creates a default-constructed value of the given type.
|
inline |
Creates a value observing a potentially present range annotation.
This method is a convenience wrapper around the other two (template) overloads.
If annotation_block contains an "::anno::soft_range()" or an "::anno::hard_range()" annotation, then this method calls the annotation-based overload with that annotation (where "::anno::soft_range()" has priority over "::anno::hard_range()"). Otherwise, it calls the type-based overload with the given value type.
|
pure virtual |
Creates a value observing a potentially present range annotation.
This method is a convenience wrapper around the other two (non-template) overloads.
If annotation_block contains an "::anno::soft_range()" or an "::anno::hard_range()" annotation, then this method calls the annotation-based overload with that annotation (where "::anno::soft_range()" has priority over "::anno::hard_range()"). Otherwise, it calls the type-based overload with the given value type.
|
pure virtual |
Creates a new value of type array, or returns nullptr in case of errors.
|
pure virtual |
Creates a new value of type boolean.
|
pure virtual |
Creates a new BSDF measurement value, or returns nullptr 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 nullptr 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 nullptr in case of errors.
|
pure virtual |
Creates a new value of type matrix, or returns nullptr in case of errors.
|
pure virtual |
Creates a new value of type string.
| value | The value nullptr is handled like the empty string. |
|
pure virtual |
Creates a new value of type struct, or returns nullptr in case of errors.
|
pure virtual |
Creates a new texture value, or returns nullptr in case of errors.
|
pure virtual |
Creates a new value list.
|
pure virtual |
Creates a new value of type vector, or returns nullptr 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 nullptr, and of the form "value" if name is nullptr. 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.