neuray API Programmer's Manual

mi::neuraylib::IType_struct Class Reference

[MDL type system]

Description

The type of kind struct.

Public Enumerations

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.

Public Member Functions

virtual Size find_field( const char* name) const =0
Returns the index of a field in linear time. 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 char* get_field_name( Size index) const =0
Returns a field name. More...
virtual const ITypeget_field_type( Size index) const =0
Returns a field type. More...
virtual Predefined_id get_predefined_id() const =0
If this struct is a predefined one, return its ID, else SID_USER.
virtual const char* get_symbol() const =0
Returns the qualified name of the struct type.

Static Public Variables

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

Enums

enum mi::​neuraylib::​IType_struct::Predefined_id

IDs to distinguish predefined struct types.

Enumerator:

SID_USER = -1
A user-defined struct type.
SID_MATERIAL_EMISSION = 0
The "::material_emission" struct type.
SID_MATERIAL_SURFACE = 1
The "::material_surface" struct type.
SID_MATERIAL_VOLUME = 2
The "::material_volume" struct type.
SID_MATERIAL_GEOMETRY = 3
The "::material_geometry" struct type.
SID_MATERIAL = 4
The "::material" struct type.
SID_FORCE_32_BIT = 0x7fffffff

Member Functions

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

Returns the index of a field in linear time.

Parameters

name
The 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

index
The 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

index
The 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

index
The 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.

Variables

const Kind mi::​neuraylib::​IType_struct::s_kind = TK_STRUCT [static]

The kind of this subclass.