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

A type of kind enum. More...

#include <itype.h>

Inheritance diagram for mi::neuraylib::IType_enum:

Public Types

enum  Predefined_id {
  EID_USER = -1 ,
  EID_TEX_GAMMA_MODE = 0 ,
  EID_INTENSITY_MODE = 1 ,
  EID_FORCE_32_BIT = 0x7fffffff
}
 IDs to distinguish predefined enum types. More...
 
- Public Types inherited from mi::base::Interface_declare< 0x0e5b167c, ... >
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< 0x9d5f9116, ... >
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 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...
 
- 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...
 
- 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_ENUM
 The kind of this subclass. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from mi::base::Interface_declare< 0x0e5b167c, ... >
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< 0x9d5f9116, ... >
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

A type of kind enum.

Member Enumeration Documentation

 Predefined_id

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

 find_value() [1/2]

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.

 find_value() [2/2]

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.

 get_annotations()

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.

 get_predefined_id()

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.

 get_size()

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

Returns the number of values.

 get_symbol()

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

Returns the qualified name of this enum type.

 get_value_annotations()

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.

 get_value_code()

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.

 get_value_name()

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

 s_kind

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

The kind of this subclass.