MDL SDK API nvidia_logo_transpbg.gif Up
mi::neuraylib::IType_struct Class Referenceabstract

The type of kind struct. More...

#include <itype.h>

Inheritance diagram for mi::neuraylib::IType_struct:

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 ,
  SID_FORCE_32_BIT = 0x7fffffff
}
 IDs to distinguish predefined struct types. More...
 
- Public Types inherited from mi::base::Interface_declare< 0x19566cb2, ... >
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< 0xc9ca497f, ... >
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::neuraylib::IType
enum  Kind {
  TK_ALIAS ,
  TK_BOOL ,
  TK_INT ,
  TK_ENUM ,
  TK_FLOAT ,
  TK_DOUBLE ,
  TK_STRING ,
  TK_VECTOR ,
  TK_MATRIX ,
  TK_COLOR ,
  TK_ARRAY ,
  TK_STRUCT ,
  TK_TEXTURE ,
  TK_LIGHT_PROFILE ,
  TK_BSDF_MEASUREMENT ,
  TK_BSDF ,
  TK_HAIR_BSDF ,
  TK_EDF ,
  TK_VDF ,
  TK_FORCE_32_BIT = 0xffffffffU
}
 The possible kinds of types. More...
 
enum  Modifier {
  MK_NONE = 0 ,
  MK_UNIFORM = 2 ,
  MK_VARYING = 4 ,
  MK_FORCE_32_BIT
}
 The possible kinds of type modifiers. More...
 
- Public Types inherited from mi::base::Interface_declare< 0x242af675, ... >
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...
 

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...
 
virtual const IStruct_categoryget_struct_category () const =0
 Returns the corresponding struct category (or NULL if there is none). More...
 
- Public Member Functions inherited from mi::neuraylib::IType_compound
virtual const ITypeget_component_type (Size index) const =0
 Returns the component type at index. More...
 
virtual Size get_size () const =0
 Returns the number of components. More...
 
- Public Member Functions inherited from mi::neuraylib::IType
virtual Kind get_kind () const =0
 Returns the kind of type. More...
 
virtual Uint32 get_all_type_modifiers () const =0
 Returns all type modifiers of a type. More...
 
virtual const ITypeskip_all_type_aliases () const =0
 Returns the base type. More...
 
virtual bool is_declarative () const =0
 Indicates whether this type is declarative or not. 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...
 

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, ... >
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< 0xc9ca497f, ... >
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< 0x242af675, ... >
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

The type of kind struct.

Member Enumeration Documentation

 Predefined_id

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

 find_field()

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.

 get_annotations()

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.

 get_field_annotations()

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.

 get_field_name()

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.

 get_field_type()

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.

 get_predefined_id()

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.

 get_struct_category()

virtual const IStruct_category * mi::neuraylib::IType_struct::get_struct_category ( ) const
pure virtual

Returns the corresponding struct category (or NULL if there is none).

 get_symbol()

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

Returns the qualified name of the struct type.

Member Data Documentation

 s_kind

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

The kind of this subclass.