neuray API Programmer's Manual

mi::neuraylib::IValue_struct Class Reference

[MDL type system]

Description

A value of type struct.

Public Member Functions

virtual const IValueget_field( const char* name) const =0
Returns a field by name in linear time. More...
template< class T>const T* get_field( const char* name) const
Returns a field by name in linear time. More...
virtual IValueget_field( const char* name) =0
Returns a field by name in linear time. More...
template< class T>T* get_field( const char* name)
Returns a field by name in linear time. More...
virtual const IType_structget_type() const =0
Returns the type of this value.
virtual Sint32 set_field( const char* name, IValue* value) =0
Sets a field by name in linear time. More...

Static Public Variables

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

Member Functions

virtual const IValue* mi::​neuraylib::​IValue_struct::get_field( const char* name) const [pure virtual]

Returns a field by name in linear time.

Parameters

name
The name of the field.

Returns

The value of the field, or NULL if there is no such field.

template< class T>

const T* mi::​neuraylib::​IValue_struct::get_field( const char* name) const [inline]

Returns a field by name in linear time.

Parameters

name
The name of the field.

Returns

The value of the field, or NULL if there is no such field.

virtual IValue* mi::​neuraylib::​IValue_struct::get_field( const char* name) [pure virtual]

Returns a field by name in linear time.

Parameters

name
The name of the field.

Returns

The value of the field, or NULL if there is no such field.

template< class T>

T* mi::​neuraylib::​IValue_struct::get_field( const char* name) [inline]

Returns a field by name in linear time.

Parameters

name
The name of the field.

Returns

The value of the field, or NULL if there is no such field.

virtual const IType_struct* mi::​neuraylib::​IValue_struct::get_type() const [pure virtual]

Returns the type of this value.

virtual Sint32 mi::​neuraylib::​IValue_struct::set_field( const char* name, IValue* value) [pure virtual]

Sets a field by name in linear time.

Parameters

name
The name of the field.
value
The new value of the field.

Returns

  • 0: Success.
  • -1: Invalid parameter (NULL pointer).
  • -2: There is no such field of the given name.
  • -3: Incorrect type of value.

Variables

const Kind mi::​neuraylib::​IValue_struct::s_kind = VK_STRUCT [static]

The kind of this subclass.