This interfaces represents a function definition. More...
Public Member Functions | |
virtual const char * | get_module () const =0 |
Returns the DB name of the module containing this function definition. More... |
|
virtual const char * | get_name () const =0 |
Returns the MDL name of the function definition. More... |
|
virtual bool | is_exported () const =0 |
Indicates whether the function definition is exported by its module. More... |
|
virtual const char * | get_return_type () const =0 |
Returns the return type. More... |
|
virtual bool | is_return_type_varying () const =0 |
Indicates whether the return type is varying. More... |
|
virtual Uint32 | get_parameter_count () const =0 |
Returns the number of parameters. More... |
|
virtual const char * | get_parameter_name (Uint32 index) const =0 |
Returns the name of the parameter at index . More... |
|
virtual Sint32 | get_parameter_index (const char *name) const =0 |
Returns the index position of a parameter. More... |
|
virtual const char * | get_parameter_type (Uint32 index) const =0 |
Returns the type of the parameter at index . More... |
|
virtual const char * | get_parameter_type (const char *name) const =0 |
Returns the type of a parameter. More... |
|
virtual bool | is_parameter_type_uniform (Uint32 index) const =0 |
Indicates whether the type of a parameter is uniform. More... |
|
virtual bool | is_parameter_type_uniform (const char *name) const =0 |
Indicates whether the type of a parameter is uniform. More... |
|
virtual const char * | get_argument_type (Uint32 index) const =0 |
Returns the type of the argument at index . More... |
|
virtual const char * | get_argument_type (const char *name) const =0 |
Returns the type of an argument. More... |
|
virtual const IAttachable * | get_default (Uint32 index) const =0 |
Returns the default initializer of the parameter at index . More... |
|
template<class T > | |
const T * | get_default (Uint32 index) const |
Returns the default initializer of the parameter at index . More... |
|
virtual const IAttachable * | get_default (const char *name) const =0 |
Returns the default initializer of a parameter. More... |
|
template<class T > | |
const T * | get_default (const char *name) const |
Returns the default initializer of a parameter. More... |
|
virtual const IAttribute_container * |
get_annotations () const =0 |
Returns the annotations of this function definition. More... |
|
virtual const IAttribute_container * |
get_return_annotations () const =0 |
Returns the annotations of the return type of this function definition. More... |
|
virtual const IAttribute_container * |
get_parameter_annotations (Uint32 index) const =0 |
Returns the annotations of the parameter at index . More... |
|
virtual const IAttribute_container * |
get_parameter_annotations (const char *name) const =0 |
Returns the annotations of a parameter. More... |
|
virtual IMdl_function_call * | create_function_call (const IAttribute_container *arguments, Sint32 *errors=0) const =0 |
Creates a new function call. More... |
|
Additional Inherited Members | |
Public Types inherited from mi::base::Interface_declare< 0x0a8d2440, 0x0b1f, 0x4424, 0x87, 0xad, 0x50, 0xe1, 0x20, 0x8e, 0x62, 0x39, neuraylib::IScene_element > | |
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 Public Member Functions inherited from mi::base::Interface_declare< 0x0a8d2440, 0x0b1f, 0x4424, 0x87, 0xad, 0x50, 0xe1, 0x20, 0x8e, 0x62, 0x39, neuraylib::IScene_element > | |
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 interfaces represents a function definition.
A function definition describes the formal structure of a function call, i.e. the number, types, names, and defaults of its parameters, as well as its return type. The create_function_call() method allows to create function calls based on this function definition.
|
pure virtual |
Creates a new function call.
arguments | The arguments of the created function call. Arguments for parameters without default initializer are mandatory, otherwise optional. The type of an attribute in the attribute container must match the required type for the argument of that name (see get_argument_type()). Any argument not set by an attribute in the attribute container will be set to the default initializer of the corresponding parameter. Note that the values in arguments are copied; passing an attribute container obtained from another MDL interface does not create a link between both instances. NULL is a valid argument which is handled like an empty attribute container. |
|
[out] | errors | An optional pointer to an mi::Sint32 to which an error code will be written. The error codes have the following meaning:
|
NULL
in case of errors.
|
pure virtual |
Returns the annotations of this function definition.
|
pure virtual |
Returns the type of the argument at index
.
The type of a given argument is an attachable of the corresponding parameter type. For example, if get_parameter_type() returns "Sint32"
, this method returns "Attachable<Sint32>"
.
If a literal 0
is passed for index
, the call is ambiguous. You need to explicitly cast the value to mi::Uint32.
index | The index of the argument. |
NULL
if index
is out of range.
|
pure virtual |
Returns the type of an argument.
The type of a given argument is an attachable of the corresponding parameter type. For example, if get_parameter_type() returns "Sint32"
, this method returns "Attachable<Sint32>"
.
name | The name of the argument. |
NULL
if name
is invalid.
|
pure virtual |
Returns the default initializer of the parameter at index
.
If a literal 0
is passed for index
, the call is ambiguous. You need to explicitly cast the value to mi::Uint32.
index | The index of the parameter. |
NULL
if index
is out of range or if there is no default initializer.
|
inline |
Returns the default initializer of the parameter at index
.
If a literal 0
is passed for index
, the call is ambiguous. You need to explicitly cast the value to mi::Uint32.
This templated member function is a wrapper of the non-template variant for the user's convenience. It eliminates the need to call mi::base::IInterface::get_interface(const Uuid &) on the returned pointer, since the return type already is a pointer to the type T
specified as template parameter.
T | The interface type of the requested element |
index | The index of the parameter. |
NULL
if index
is out of range or if there is no default initializer.
|
pure virtual |
Returns the default initializer of a parameter.
name | The name of the parameter. |
NULL
if name
is invalid or if there is no default initializer.
|
inline |
Returns the default initializer of a parameter.
This templated member function is a wrapper of the non-template variant for the user's convenience. It eliminates the need to call mi::base::IInterface::get_interface(const Uuid &) on the returned pointer, since the return type already is a pointer to the type T
specified as template parameter.
T | The interface type of the requested element |
name | The name of the parameter. |
NULL
if name
is invalid or if there is no default initializer.
|
pure virtual |
Returns the DB name of the module containing this function definition.
The type of the module is mi::neuraylib::IMdl_module.
|
pure virtual |
Returns the MDL name of the function definition.
|
pure virtual |
Returns the annotations of the parameter at index
.
If a literal 0
is passed for index
, the call is ambiguous. You need to explicitly cast the value to mi::Uint32.
index | The index of the parameter. |
NULL
if index
is out of range.
|
pure virtual |
Returns the annotations of a parameter.
name | The name of the parameter. |
NULL
if name
is invalid.
|
pure virtual |
Returns the number of parameters.
|
pure virtual |
Returns the index position of a parameter.
name | The name of the parameter. |
name
is invalid.
|
pure virtual |
Returns the name of the parameter at index
.
index | The index of the parameter. |
NULL
if index
is out of range.
|
pure virtual |
Returns the type of the parameter at index
.
If a literal 0
is passed for index
, the call is ambiguous. You need to explicitly cast the value to mi::Uint32.
index | The index of the parameter. |
NULL
if index
is out of range.
|
pure virtual |
Returns the type of a parameter.
name | The name of the parameter. |
NULL
if name
is invalid.
|
pure virtual |
Returns the annotations of the return type of this function definition.
|
pure virtual |
Returns the return type.
|
pure virtual |
Indicates whether the function definition is exported by its module.
|
pure virtual |
Indicates whether the type of a parameter is uniform.
index | The index of the parameter. |
true
if the parameter is uniform, otherwise false
(including invalid index
).
|
pure virtual |
Indicates whether the type of a parameter is uniform.
name | The name of the parameter. |
true
if the parameter is uniform, otherwise false
(including invalid name
).
|
pure virtual |
Indicates whether the return type is varying.
true
if the return type is varying, otherwise false
.