neuray API Programmer's Manual

mi::IStructure Class Reference

[Collections]

Description

This interface represents structures, i.e., a key-value based data structure. Structures are based on a structure declaration which defines the structure members (their types, name, and the order). The type name of a structure is the name that was used to register its structure declaration. This type name can be used to create instances of a particular structure declaration (note that "Structure" itself is not a valid type name as it does not contain any information about a concrete structure type).

This interface does not offer any specialized methods, except get_structure_decl(). All the structure functionality is available via methods inherited from mi::IData_collection where the name of a structure member equals the key. The key indices correspond with the indices in the structure declaration.

Note:

The value returned by mi::IData::get_type_name() might start with '{' which indicates that it has been automatically generated. In this case the type name should be treated as an opaque string since its format might change unexpectedly. It is perfectly fine to pass it to other methods, e.g., mi::neuraylib::IFactory::create(), but you should not attempt to interpret the value in any way. Use get_structure_decl() to obtain information about the type itself.

See also:

mi::IStructure_decl

Public Member Functions

virtual const IStructure_declget_structure_decl() const =0
Returns the structure declaration for this structure.

Member Functions

virtual const IStructure_decl* mi::​IStructure::get_structure_decl() const [pure virtual]

Returns the structure declaration for this structure.