This interface represents a function call.
More...
|
typedef Interface_declare< id1,
id2, id3, id4, id5, id6, id7,
id8, id9, id10, id11,
neuraylib::IScene_element > | Self |
| Own type. More...
|
|
typedef Uuid_t< id1, id2, id3,
id4, id5, id6, id7, id8, id9,
id10, id11 > | IID |
| Declares the interface ID (IID) of this interface. More...
|
|
static bool | compare_iid (const Uuid &iid) |
| Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
|
|
This interface represents a function call.
A function call is an instance of a formal function definition, with a fixed set of arguments (possibly the defaults of the function definition). Function calls can be created from function definitions using mi::neuraylib::IFunction_definition::create_function_call().
- See Also
- mi::neuraylib::IFunction_definition, mi::neuraylib::Argument_editor
virtual const IExpression_list* mi::neuraylib::IFunction_call::get_arguments |
( |
) | |
const |
|
pure virtual |
virtual const char* mi::neuraylib::IFunction_call::get_function_definition |
( |
) | |
const |
|
pure virtual |
virtual const char* mi::neuraylib::IFunction_call::get_mdl_function_definition |
( |
) | |
const |
|
pure virtual |
Returns the MDL name of the corresponding function definition.
- Note
- The MDL name of the function definition is different from the name of the DB element (see get_function_definition()).
virtual Size mi::neuraylib::IFunction_call::get_parameter_count |
( |
) | |
const |
|
pure virtual |
Returns the number of parameters.
virtual Size mi::neuraylib::IFunction_call::get_parameter_index |
( |
const char * |
name) | |
const |
|
pure virtual |
Returns the index position of a parameter.
- Parameters
-
name | The name of the parameter. |
- Returns
- The index of the parameter, or -1 if
name
is invalid.
virtual const char* mi::neuraylib::IFunction_call::get_parameter_name |
( |
Size |
index) | |
const |
|
pure virtual |
Returns the name of the parameter at index
.
- Parameters
-
index | The index of the parameter. |
- Returns
- The name of the parameter, or
NULL
if index
is out of range.
virtual const IType_list* mi::neuraylib::IFunction_call::get_parameter_types |
( |
) | |
const |
|
pure virtual |
Returns the types of all parameters.
virtual const IType* mi::neuraylib::IFunction_call::get_return_type |
( |
) | |
const |
|
pure virtual |
Returns the return type of the corresponding function definition.
bool mi::neuraylib::IFunction_call::is_array_constructor |
( |
) | |
const |
|
inline |
Indicates whether this call is and instance of the array constructor.
- See Also
- Arrays
Sets the argument at index
.
- Parameters
-
index | The index of the argument. |
argument | The argument. Note that the expression is copied. This copy operation is a shallow copy, e.g., DB elements referenced in call expressions are not copied. |
- Returns
- 0: Success.
- -1: Invalid parameters (
NULL
pointer).
- -2: Parameter
index
does not exist.
- -3: The argument type does not match the parameter type.
- -4: The function call is immutable (because it appears in a default of a function or material definition).
- -5: The parameter type is uniform, but the argument type is varying.
- -6: The argument expression is not a constant nor a call.
- -7: The argument contains references to DB elements in a scope that is more private scope than the scope of this material instance.
- -8: The parameter types is uniform, but the argument is a call expression and the return type of the called function definition is effectively varying since the function definition itself is varying.
virtual Sint32 mi::neuraylib::IFunction_call::set_argument |
( |
const char * |
name, |
|
|
const IExpression * |
argument |
|
) |
| |
|
pure virtual |
Sets an argument identified by name.
- Parameters
-
name | The name of the parameter. |
argument | The argument. Note that the expression is copied. This copy operation is a shallow copy, e.g., DB elements referenced in call expressions are not copied. |
- Returns
- 0: Success.
- -1: Invalid parameters (
NULL
pointer).
- -2: Parameter
name
does not exist.
- -3: The argument type does not match the parameter type.
- -4: The function call is immutable (because it appears in a default of a function or material definition).
- -5: The parameter type is uniform, but the argument type is varying.
- -6: The argument expression is not a constant nor a call.
- -7: The argument contains references to DB elements in a scope that is more private scope than the scope of this material instance.
- -8: The parameter types is uniform, but the argument is a call expression and the return type of the called function definition is effectively varying since the function definition itself is varying.
Sets multiple arguments.
- Parameters
-
arguments | The arguments. Note that the expressions are copied. This copy operation is a shallow copy, e.g., DB elements referenced in call expressions are not copied. |
- Returns
- 0: Success.
- -1: Invalid parameters (
NULL
pointer).
- -2: One of the parameters in
arguments
does not exist.
- -3: One of the argument types does not match the corresponding parameter type.
- -4: The function call is immutable (because it appears in a default of a function or material definition).
- -5: One of the parameter types is uniform, but the corresponding argument type is varying.
- -6: One of the arguments is not a constant nor a call.
- -7: One of the arguments contains references to DB elements in a scope that is more private scope than the scope of this material instance.
- -8: One of the parameter types is uniform, but the corresponding argument is a call expression and the return type of the called function definition is effectively varying since the function definition itself is varying.