neuray API Programmer's Manual

mi::neuraylib::IValue_compound Class Reference

[MDL type system]

Description

A compound value.

Public Member Functions

virtual Size get_size() const =0
Returns the number of components in this compound value.
virtual const IType_compoundget_type() const =0
Returns the type of this value.
virtual const IValueget_value( Size index) const =0
Returns the value at index, or NULL if index is out of bounds.
template< class T>const T* get_value( Size index) const
Returns the value at index, or NULL if index is out of bounds.
virtual IValueget_value( Size index) =0
Returns the value at index, or NULL if index is out of bounds.
template< class T>T* get_value( Size index)
Returns the value at index, or NULL if index is out of bounds.
virtual Sint32 set_value( Size index, IValue* value) =0
Sets the value at index. More...

Member Functions

virtual Size mi::​neuraylib::​IValue_compound::get_size() const [pure virtual]

Returns the number of components in this compound value.

virtual const IType_compound* mi::​neuraylib::​IValue_compound::get_type() const [pure virtual]

Returns the type of this value.

virtual const IValue* mi::​neuraylib::​IValue_compound::get_value( Size index) const [pure virtual]

Returns the value at index, or NULL if index is out of bounds.

template< class T>

const T* mi::​neuraylib::​IValue_compound::get_value( Size index) const [inline]

Returns the value at index, or NULL if index is out of bounds.

virtual IValue* mi::​neuraylib::​IValue_compound::get_value( Size index) [pure virtual]

Returns the value at index, or NULL if index is out of bounds.

template< class T>

T* mi::​neuraylib::​IValue_compound::get_value( Size index) [inline]

Returns the value at index, or NULL if index is out of bounds.

virtual Sint32 mi::​neuraylib::​IValue_compound::set_value( Size index, IValue* value) [pure virtual]

Sets the value at index.

Parameters

index
The index of the field.
value
The new value of the field.

Returns

  • 0: Success.
  • -1: Invalid parameter (NULL pointer).
  • -2: index is out of bounds.
  • -3: Incorrect type of value.