neuray API Programmer's Manual

mi::neuraylib::IExpression_constant Class Reference

[MDL type system]

Description

A constant expression. Constant expressions represent values (see mi::neuraylib::IValue). They appear basically everywhere where expression are used.

Public Member Functions

virtual const IValueget_value() const =0
Returns the value of the constant.
template< class T>const T* get_value() const
Returns the value of the constant.
virtual IValueget_value() =0
Returns the value of the constant.
template< class T>T* get_value()
Returns the value of the constant.
virtual Sint32 set_value( IValue* value) =0
Sets the value of the constant. More...

Static Public Variables

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

Member Functions

virtual const IValue* mi::​neuraylib::​IExpression_constant::get_value() const [pure virtual]

Returns the value of the constant.

template< class T>

const T* mi::​neuraylib::​IExpression_constant::get_value() const [inline]

Returns the value of the constant.

virtual IValue* mi::​neuraylib::​IExpression_constant::get_value() [pure virtual]

Returns the value of the constant.

template< class T>

T* mi::​neuraylib::​IExpression_constant::get_value() [inline]

Returns the value of the constant.

virtual Sint32 mi::​neuraylib::​IExpression_constant::set_value( IValue* value) [pure virtual]

Sets the value of the constant.

Returns

  • 0: Success.
  • -1: Invalid parameter (NULL pointer).
  • -2: The type of value does not match the type of the constant.

Variables

const Kind mi::​neuraylib::​IExpression_constant::s_kind = EK_CONSTANT [static]

The kind of this subclass.