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

A type of kind enum. More...

Inheritance diagram for mi::neuraylib::IType_enum:
mi::base::Interface_declare< 0x0e5b167c, 0x9c3e, 0x48bf, 0xb5, 0xfd, 0x37, 0x96, 0xaa, 0x47, 0xaf, 0xd1, neuraylib::IType_atomic > mi::neuraylib::IType_atomic mi::base::Interface_declare< 0x9d5f9116, 0x3896, 0x45c8, 0xb4, 0x5a, 0x8b, 0x03, 0x84, 0x49, 0x0a, 0x77, 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 {
  EID_USER = -1,
  EID_TEX_GAMMA_MODE = 0,
  EID_INTENSITY_MODE = 1
}
 IDs to distinguish predefined enum types. More...
 
- Public Types inherited from mi::base::Interface_declare< 0x0e5b167c, 0x9c3e, 0x48bf, 0xb5, 0xfd, 0x37, 0x96, 0xaa, 0x47, 0xaf, 0xd1, neuraylib::IType_atomic >
typedef Interface_declare< id1,
id2, id3, id4, id5, id6, id7,
id8, id9, id10, id11,
neuraylib::IType_atomic
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 this enum type. More...
 
virtual Size get_size () const =0
 Returns the number of values. More...
 
virtual const char * get_value_name (Size index) const =0
 Returns the name of a value. More...
 
virtual Sint32 get_value_code (Size index, Sint32 *errors=0) const =0
 Returns the code of a value. More...
 
virtual Size find_value (const char *name) const =0
 Returns the index of a value in linear time. More...
 
virtual Size find_value (Sint32 code) const =0
 Returns the index of a value in linear time. More...
 
virtual Predefined_id get_predefined_id () const =0
 If this enum is a predefined one, return its ID, else EID_USER. More...
 
virtual const IAnnotation_blockget_annotations () const =0
 Returns the annotations of the enum type. More...
 
virtual const IAnnotation_blockget_value_annotations (Size index) const =0
 Returns the annotations of a value. More...
 

Static Public Attributes

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

Additional Inherited Members

- Static Public Member Functions inherited from mi::base::Interface_declare< 0x0e5b167c, 0x9c3e, 0x48bf, 0xb5, 0xfd, 0x37, 0x96, 0xaa, 0x47, 0xaf, 0xd1, neuraylib::IType_atomic >
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

A type of kind enum.

Member Enumeration Documentation

IDs to distinguish predefined enum types.

Enumerator
EID_USER 

A user-defined enum type.

EID_TEX_GAMMA_MODE 

The "::tex::gamma_mode" enum type.

EID_INTENSITY_MODE 

The "::intensity_mode" enum type.

Member Function Documentation

virtual Size mi::neuraylib::IType_enum::find_value ( const char *  name) const
pure virtual

Returns the index of a value in linear time.

Parameters
nameThe unqualified name of the value.
Returns
The index of the value, or -1 if there is no such value.
virtual Size mi::neuraylib::IType_enum::find_value ( Sint32  code) const
pure virtual

Returns the index of a value in linear time.

Parameters
codeThe code of the value.
Returns
The index of the value, or -1 if there is no such value.
virtual const IAnnotation_block* mi::neuraylib::IType_enum::get_annotations ( ) const
pure virtual

Returns the annotations of the enum type.

Returns
The annotations of the enum type, or NULL if there are no annotations for the enum type.
virtual Predefined_id mi::neuraylib::IType_enum::get_predefined_id ( ) const
pure virtual

If this enum is a predefined one, return its ID, else EID_USER.

virtual Size mi::neuraylib::IType_enum::get_size ( ) const
pure virtual

Returns the number of values.

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

Returns the qualified name of this enum type.

virtual const IAnnotation_block* mi::neuraylib::IType_enum::get_value_annotations ( Size  index) const
pure virtual

Returns the annotations of a value.

Parameters
indexThe index of the value.
Returns
The annotation of that value, or NULL if index is out of bounds, or there are no annotations for that value.
virtual Sint32 mi::neuraylib::IType_enum::get_value_code ( Size  index,
Sint32 errors = 0 
) const
pure virtual

Returns the code of a value.

Parameters
indexThe index of the value.
[out]errors
  • 0: Success.
  • -1: index is invalid.
Returns
The code of the value, or 0 in case of errors.
virtual const char* mi::neuraylib::IType_enum::get_value_name ( Size  index) const
pure virtual

Returns the name of a value.

Parameters
indexThe index of the value.
Returns
The unqualified name of the value, or NULL if index is invalid.

Member Data Documentation

const Kind mi::neuraylib::IType_enum::s_kind = TK_ENUM
static

The kind of this subclass.