An indirect call expression. More...
#include <iexpression.h>
Public Member Functions | |
virtual const char * | get_call () const =0 |
Returns the DB name of the referenced function call or material instance. More... | |
virtual Sint32 | set_call (const char *name)=0 |
Sets the name of the referenced function call or material instance. More... | |
Public Member Functions inherited from mi::neuraylib::IExpression | |
virtual Kind | get_kind () const =0 |
Returns the kind of this expression. More... | |
virtual const IType * | get_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 IInterface * | get_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 IInterface * | get_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_CALL |
The kind of this subclass. More... | |
Additional Inherited Members | |
Public Types inherited from mi::base::Interface_declare< 0xcf625aec, ... > | |
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< 0xcf625aec, ... > | |
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... | |
An indirect call expression.
This call expression is called indirect since it just references another DB element representing the actual call. This contrasts with mi::neuraylib::IExpression_direct_call for direct call expressions. See below for a more detailed comparison.
Indirect call expressions appear as defaults of material or function definitions, as arguments of material instances or function calls, and as defaults in the module builder.
There are two different types of call expressions, indirect calls (represented by this interface mi::neuraylib::IExpression_call) and direct calls (represented by mi::neuraylib::IExpression_direct_call). Both have their disjoint use cases, and they never appear together in the very same expression graph.
Indirect calls are used where the expression graph is frequently changed by the user, in particular for arguments of function calls and material instances. These indirect calls simply reference another DB element by name, which represents the actual call. Note that such an argument might not just be a constant or a single call (with constants as arguments), but can be a rather complex graph (so-called open material graphs). The indirection via DB elements allows to access any such graph node directly (assuming its name is known) in order to modify it, without traversing the entire expression graph first to reach a given node.
Direct calls are used where the expression graph is fixed (bodies of material and function definitions, and compiled materials), or where such a graph is constructed once and not modified later (bodies in the module builder). In these cases the indirection via DB elements is not necessary and would be rather cumbersome.
Note that defaults use indirect calls, even though they are fixed. This exception was made to stress the similarity to arguments, e.g., it allows to pass a default as a new argument to mi::neuraylib::IFunction_call::set_argument().
|
pure virtual |
Returns the DB name of the referenced function call or material instance.
|
pure virtual |
Sets the name of the referenced function call or material instance.
name | The DB name of the function call or material instance. |
NULL
pointer).