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

A parameter reference expression. More...

#include <iexpression.h>

Inheritance diagram for mi::neuraylib::IExpression_parameter:

Public Member Functions

virtual Size get_index () const =0
 Returns the index of the referenced parameter. More...
 
virtual void set_index (Size index)=0
 Sets the index of the referenced parameter. More...
 
- Public Member Functions inherited from mi::neuraylib::IExpression
virtual Kind get_kind () const =0
 Returns the kind of this expression. More...
 
virtual const ITypeget_type () const =0
 Returns the type of this expression. More...
 
template<class T>
const T * get_type () const
 Returns the type of this expression. 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 = EK_PARAMETER
 The kind of this subclass. More...
 

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0x206c4319, ... >
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::IExpression
enum  Kind {
  EK_CONSTANT ,
  EK_CALL ,
  EK_PARAMETER ,
  EK_DIRECT_CALL ,
  EK_TEMPORARY ,
  EK_FORCE_32_BIT = 0xffffffffU
}
 The possible kinds of expressions. More...
 
- Public Types inherited from mi::base::Interface_declare< 0x0f4a7542, ... >
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...
 
- Static Public Member Functions inherited from mi::base::Interface_declare< 0x206c4319, ... >
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< 0x0f4a7542, ... >
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 parameter reference expression.

Parameter reference expressions are used for defaults that reference earlier parameters. For example consider

float foo(float a, float b, float c = b) { ... }

The default for the parameter c is of type mi::neuraylib::IExpression_parameter. Its index is 1, equal to the parameter index of parameter b.

Parameter reference expressions appear as defaults of material or function definitions. They are expanded during mi::neuraylib::IFunction_definition::create_function_call(), mi::neuraylib::IFunction_call::reset_argument(), and mi::neuraylib::Definition_wrapper::create_instance().

Member Function Documentation

 get_index()

virtual Size mi::neuraylib::IExpression_parameter::get_index ( ) const
pure virtual

Returns the index of the referenced parameter.

 set_index()

virtual void mi::neuraylib::IExpression_parameter::set_index ( Size  index)
pure virtual

Sets the index of the referenced parameter.

Member Data Documentation

 s_kind

const Kind mi::neuraylib::IExpression_parameter::s_kind = EK_PARAMETER
static

The kind of this subclass.