Material Definition Language API nvidia_logo_transpbg.gif Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mi::neuraylib::IType_struct Class Referenceabstract

The type of kind struct. More...

Inheritance diagram for mi::neuraylib::IType_struct:
mi::base::Interface_declare< 0x19566cb2, 0x0b5d, 0x41ca, 0xa0, 0x31, 0x96, 0xe2, 0x9a, 0xd4, 0xc3, 0x1a, neuraylib::IType_compound > mi::neuraylib::IType_compound mi::base::Interface_declare< 0xc9ca497f, 0xc38b, 0x411f, 0xa8, 0x16, 0xa7, 0xd8, 0x23, 0x28, 0xa5, 0x40, neuraylib::IType > mi::neuraylib::IType mi::base::Interface_declare< 0x242af675, 0xeaa2, 0x48b7, 0x81, 0x63, 0xba, 0x06, 0xa5, 0xfb, 0x68, 0xf0 > mi::base::IInterface

Public Types

enum  Predefined_id {
  SID_USER = -1,
  SID_MATERIAL_EMISSION = 0,
  SID_MATERIAL_SURFACE = 1,
  SID_MATERIAL_VOLUME = 2,
  SID_MATERIAL_GEOMETRY = 3,
  SID_MATERIAL = 4
}
 IDs to distinguish predefined struct types. More...
 
- Public Types inherited from mi::base::Interface_declare< 0x19566cb2, 0x0b5d, 0x41ca, 0xa0, 0x31, 0x96, 0xe2, 0x9a, 0xd4, 0xc3, 0x1a, neuraylib::IType_compound >
typedef Interface_declare< id1,
id2, id3, id4, id5, id6, id7,
id8, id9, id10, id11,
neuraylib::IType_compound
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...
 

Public Member Functions

virtual const char * get_symbol () const =0
 Returns the qualified name of the struct type. More...
 
virtual const ITypeget_field_type (Size index) const =0
 Returns a field type. More...
 
virtual const char * get_field_name (Size index) const =0
 Returns a field name. More...
 
virtual Size find_field (const char *name) const =0
 Returns the index of a field in linear time. More...
 
virtual Predefined_id get_predefined_id () const =0
 If this struct is a predefined one, return its ID, else SID_USER. More...
 
virtual const IAnnotation_blockget_annotations () const =0
 Returns the annotations of the struct type. More...
 
virtual const IAnnotation_blockget_field_annotations (Size index) const =0
 Returns the annotations of a field. More...
 

Static Public Attributes

static const Kind s_kind = TK_STRUCT
 The kind of this subclass. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from mi::base::Interface_declare< 0x19566cb2, 0x0b5d, 0x41ca, 0xa0, 0x31, 0x96, 0xe2, 0x9a, 0xd4, 0xc3, 0x1a, neuraylib::IType_compound >
static bool compare_iid (const Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
 

Detailed Description

The type of kind struct.

Member Enumeration Documentation

IDs to distinguish predefined struct types.

Enumerator
SID_USER 

A user-defined struct type.

SID_MATERIAL_EMISSION 

The "::material_emission" struct type.

SID_MATERIAL_SURFACE 

The "::material_surface" struct type.

SID_MATERIAL_VOLUME 

The "::material_volume" struct type.

SID_MATERIAL_GEOMETRY 

The "::material_geometry" struct type.

SID_MATERIAL 

The "::material" struct type.

Member Function Documentation

virtual Size mi::neuraylib::IType_struct::find_field ( const char *  name) const
pure virtual

Returns the index of a field in linear time.

Parameters
nameThe unqualified name of the field.
Returns
The index of the field, or -1 if there is no such field.
virtual const IAnnotation_block* mi::neuraylib::IType_struct::get_annotations ( ) const
pure virtual

Returns the annotations of the struct type.

Returns
The annotations of the struct type, or NULL if there are no annotations for the struct type.
virtual const IAnnotation_block* mi::neuraylib::IType_struct::get_field_annotations ( Size  index) const
pure virtual

Returns the annotations of a field.

Parameters
indexThe index of the field.
Returns
The annotation of that field, or NULL if index is out of bounds, or there are no annotations for that field.
virtual const char* mi::neuraylib::IType_struct::get_field_name ( Size  index) const
pure virtual

Returns a field name.

Parameters
indexThe index of the field.
Returns
The unqualified name of the field.
virtual const IType* mi::neuraylib::IType_struct::get_field_type ( Size  index) const
pure virtual

Returns a field type.

Parameters
indexThe index of the field.
Returns
The type of the field.
virtual Predefined_id mi::neuraylib::IType_struct::get_predefined_id ( ) const
pure virtual

If this struct is a predefined one, return its ID, else SID_USER.

virtual const char* mi::neuraylib::IType_struct::get_symbol ( ) const
pure virtual

Returns the qualified name of the struct type.

Member Data Documentation

const Kind mi::neuraylib::IType_struct::s_kind = TK_STRUCT
static

The kind of this subclass.