MDL SDK API nvidia_logo_transpbg.gif Up
mi::IStructure Class Referenceabstract

This interface represents structures, i.e., a key-value based data structure. More...

#include <istructure.h>

Inheritance diagram for mi::IStructure:

Public Member Functions

virtual const IStructure_declget_structure_decl () const =0
 Returns the structure declaration for this structure. More...
 
- Public Member Functions inherited from mi::IData_collection
virtual Size get_length () const =0
 Returns the number of values. More...
 
virtual const char * get_key (Size index) const =0
 Returns the key corresponding to index. More...
 
virtual bool has_key (const char *key) const =0
 Indicates whether the key key exists or not. More...
 
virtual const base::IInterfaceget_value (const char *key) const =0
 Returns the value for key key. More...
 
template<class T>
const T * get_value (const char *key) const
 Returns the value for key key. More...
 
virtual base::IInterfaceget_value (const char *key)=0
 Returns the value for key key. More...
 
template<class T>
T * get_value (const char *key)
 Returns the value for key key. More...
 
virtual const base::IInterfaceget_value (Size index) const =0
 Returns the value for index index. More...
 
template<class T>
const T * get_value (Size index) const
 Returns the value for index index. More...
 
virtual base::IInterfaceget_value (Size index)=0
 Returns the value for index index. More...
 
template<class T>
T * get_value (Size index)
 Returns the value for index index. More...
 
virtual Sint32 set_value (const char *key, base::IInterface *value)=0
 Stores the value for key key. More...
 
virtual Sint32 set_value (Size index, base::IInterface *value)=0
 Stores the value for index index. More...
 
- Public Member Functions inherited from mi::IData
virtual const char * get_type_name () const =0
 Returns the type name. 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 IInterfaceget_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 IInterfaceget_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< 0xd23152f6, ... >
typedef Interface_declare< id1, ... > Self
 Own type. More...
 
typedef Uuid_t< id1, ... > IID
 Declares the interface ID (IID) of this interface. More...
 
- Public Types inherited from mi::base::Interface_declare< 0x1bb2be0f, ... >
typedef Interface_declare< id1, ... > Self
 Own type. More...
 
typedef Uuid_t< id1, ... > IID
 Declares the interface ID (IID) of this interface. More...
 
- Public Types inherited from mi::base::Interface_declare< 0x2e5f84bc, ... >
typedef Interface_declare< id1, ... > Self
 Own type. More...
 
typedef Uuid_t< id1, ... > IID
 Declares the interface ID (IID) of this interface. More...
 
- Public Types inherited from mi::base::IInterface
typedef Uuid_t<0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0> IID
 Declares the interface ID (IID) of this interface. More...
 
- Static Public Member Functions inherited from mi::base::Interface_declare< 0xd23152f6, ... >
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::Interface_declare< 0x1bb2be0f, ... >
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::Interface_declare< 0x2e5f84bc, ... >
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...
 

Detailed 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

Member Function Documentation

 get_structure_decl()

virtual const IStructure_decl * mi::IStructure::get_structure_decl ( ) const
pure virtual

Returns the structure declaration for this structure.