This interface represents an MDL module. More...
#include <imodule.h>

Public Member Functions | |
| virtual const char * | get_filename () const =0 |
| Returns the name of the MDL source file from which this module was created. More... | |
| virtual const char * | get_mdl_name () const =0 |
| Returns the MDL name of the module. More... | |
| virtual Size | get_mdl_package_component_count () const =0 |
| Returns the number of package components in the MDL name. More... | |
| virtual const char * | get_mdl_package_component_name (Size index) const =0 |
| Returns the name of a package component in the MDL name. More... | |
| virtual const char * | get_mdl_simple_name () const =0 |
| Returns the simple MDL name of the module. More... | |
| virtual Mdl_version | get_mdl_version () const =0 |
| Returns the MDL version of this module. More... | |
| virtual Size | get_import_count () const =0 |
| Returns the number of modules imported by the module. More... | |
| virtual const char * | get_import (Size index) const =0 |
Returns the DB name of the imported module at index. More... | |
| virtual const IStruct_category_list * | get_struct_categories () const =0 |
| Returns the struct categories exported by this module. More... | |
| virtual const IType_list * | get_types () const =0 |
| Returns the types exported by this module. More... | |
| virtual const IValue_list * | get_constants () const =0 |
| Returns the constants exported by this module. More... | |
| virtual Size | get_function_count () const =0 |
| Returns the number of function definitions exported by the module. More... | |
| virtual const char * | get_function (Size index) const =0 |
Returns the DB name of the function definition at index. More... | |
| virtual Size | get_material_count () const =0 |
| Returns the number of material definitions exported by the module. More... | |
| virtual const char * | get_material (Size index) const =0 |
Returns the DB name of the material definition at index. More... | |
| virtual Size | get_resources_count () const =0 |
| Returns the number of resources defined in the module. More... | |
| virtual const IValue_resource * | get_resource (Size index) const =0 |
| Returns a resource defined in the module. More... | |
| virtual Size | get_annotation_definition_count () const =0 |
| Returns the number of annotations defined in the module. More... | |
| virtual const IAnnotation_definition * | get_annotation_definition (Size index) const =0 |
Returns the annotation definition at index. More... | |
| virtual const IAnnotation_definition * | get_annotation_definition (const char *name) const =0 |
Returns the annotation definition of the given name. More... | |
| virtual const IAnnotation_block * | get_annotations () const =0 |
Returns the annotations of the module, or nullptr if there are no such annotations. More... | |
| virtual bool | is_standard_module () const =0 |
| Indicates whether this module is a standard module. More... | |
| virtual bool | is_mdle_module () const =0 |
Indicates whether this module results from an .mdle file. More... | |
| virtual const IArray * | get_function_overloads (const char *name, const IExpression_list *arguments=nullptr) const =0 |
| Returns overloads of a function or material definition. More... | |
| virtual const IArray * | get_function_overloads (const char *name, const IArray *parameter_types) const =0 |
| Returns overloads of a function or material definition. More... | |
| virtual bool | is_valid (IMdl_execution_context *context) const =0 |
Returns true if all imports of the module are valid. More... | |
| virtual Sint32 | reload (bool recursive, IMdl_execution_context *context)=0 |
| Reload the module from disk. More... | |
| virtual Sint32 | reload_from_string (const char *module_source, bool recursive, IMdl_execution_context *context)=0 |
| Reload the module from string. More... | |
Public Member Functions inherited from mi::neuraylib::IScene_element | |
| virtual Element_type | get_element_type () const =0 |
| Indicates the actual scene element represented by interfaces derived from this interface. More... | |
Public Member Functions inherited from mi::neuraylib::IAttribute_set | |
| virtual IData * | create_attribute (const char *name, const char *type)=0 |
Creates a new attribute name of the type type. More... | |
| template<class T> | |
| T * | create_attribute (const char *name, const char *type) |
Creates a new attribute name of the type type. More... | |
| template<class T> | |
| T * | create_attribute (const char *name) |
Creates a new attribute name of the type T. More... | |
| virtual bool | destroy_attribute (const char *name)=0 |
Destroys the attribute name. More... | |
| virtual const IData * | access_attribute (const char *name) const =0 |
Returns a const pointer to the attribute name. More... | |
| template<class T> | |
| const T * | access_attribute (const char *name) const |
Returns a const pointer to the attribute name. More... | |
| virtual IData * | edit_attribute (const char *name)=0 |
Returns a mutable pointer to the attribute name. More... | |
| template<class T> | |
| T * | edit_attribute (const char *name) |
Returns a mutable pointer to the attribute name. More... | |
| virtual bool | is_attribute (const char *name) const =0 |
| Indicates existence of an attribute. More... | |
| virtual const char * | get_attribute_type_name (const char *name) const =0 |
| Returns the type of an attribute. More... | |
| virtual Sint32 | set_attribute_propagation (const char *name, Propagation_type value)=0 |
Sets the propagation type of the attribute name. More... | |
| virtual Propagation_type | get_attribute_propagation (const char *name) const =0 |
Returns the propagation type of the attribute name. More... | |
| virtual const char * | enumerate_attributes (Sint32 index) const =0 |
Returns the name of the attribute indicated by index. 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... | |
Additional Inherited Members | |
Public Types inherited from mi::base::Interface_declare< 0xe283b0ee, ... > | |
| using | Self = Interface_declare< id1, ... > |
| Own type. More... | |
| using | IID = Uuid_t< id1, ... > |
| Declares the interface ID (IID) of this interface. More... | |
Public Types inherited from mi::base::Interface_declare< 0x8a2a4da9, ... > | |
| using | Self = Interface_declare< id1, ... > |
| Own type. More... | |
| using | IID = Uuid_t< id1, ... > |
| Declares the interface ID (IID) of this interface. More... | |
Public Types inherited from mi::base::Interface_declare< 0x1bcb8d48, ... > | |
| using | Self = Interface_declare< id1, ... > |
| Own type. More... | |
| using | IID = Uuid_t< id1, ... > |
| Declares the interface ID (IID) of this interface. More... | |
Public Types inherited from mi::base::IInterface | |
| using | IID = Uuid_t<0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0> |
| Declares the interface ID (IID) of this interface. More... | |
Static Public Member Functions inherited from mi::base::Interface_declare< 0xe283b0ee, ... > | |
| 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< 0x8a2a4da9, ... > | |
| 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< 0x1bcb8d48, ... > | |
| 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... | |
This interface represents an MDL module.
|
pure virtual |
Returns the annotation definition of the given name.
| name | The name of the annotation definition. |
nullptr if there is no such definition.
|
pure virtual |
Returns the annotation definition at index.
| index | The index of the annotation definition. |
nullptr if index is out of range.
|
pure virtual |
Returns the number of annotations defined in the module.
|
pure virtual |
Returns the annotations of the module, or nullptr if there are no such annotations.
|
pure virtual |
Returns the constants exported by this module.
|
pure virtual |
Returns the name of the MDL source file from which this module was created.
nullptr if no such file exists.
|
pure virtual |
Returns the DB name of the function definition at index.
| index | The index of the function definition. |
nullptr for valid indices if the corresponding function definition has already been removed from the DB.
|
pure virtual |
Returns the number of function definitions exported by the module.
|
pure virtual |
Returns overloads of a function or material definition.
The method returns the best-matching overloads of a function or material definition of this module, given a list of positional parameter types.
| name | The simple name or the DB name without signature of a function or material definition from this module. |
| parameter_types | A static or dynamic array with elements of type mi::IString representing positional parameter type names as returned by mi::neuraylib::IFunction_definition::get_mdl_parameter_type_name(). |
nullptr if name is invalid.
|
pure virtual |
Returns overloads of a function or material definition.
The method returns overloads of a function or material definition of this module, either all overloads or just the overloads matching a given set of arguments.
| name | The simple name or the DB name without signature of a function or material definition from this module. |
| arguments | Optional arguments to select specific overload(s). If present, the method returns only the overloads of name whose signature matches the provided arguments, i.e., a call to mi::neuraylib::IFunction_definition::create_function_call() with these arguments would succeed. |
nullptr if name is invalid.
|
pure virtual |
Returns the DB name of the imported module at index.
| index | The index of the imported module. |
|
pure virtual |
Returns the number of modules imported by the module.
|
pure virtual |
Returns the DB name of the material definition at index.
| index | The index of the material definition. |
nullptr for valid indices if the corresponding material definition has already been removed from the DB.
|
pure virtual |
Returns the number of material definitions exported by the module.
|
pure virtual |
Returns the MDL name of the module.
|
pure virtual |
Returns the number of package components in the MDL name.
|
pure virtual |
Returns the name of a package component in the MDL name.
index -th package component name, or nullptr if index is out of bounds.
|
pure virtual |
Returns the simple MDL name of the module.
The simple name is the last component of the MDL name, i.e., without any packages and scope qualifiers.
|
pure virtual |
Returns the MDL version of this module.
|
pure virtual |
Returns a resource defined in the module.
Resources defined in a module that is imported by this module are not included.
|
pure virtual |
Returns the number of resources defined in the module.
Resources defined in a module that is imported by this module are not included.
|
pure virtual |
Returns the struct categories exported by this module.
|
pure virtual |
Returns the types exported by this module.
|
pure virtual |
Indicates whether this module results from an .mdle file.
|
pure virtual |
Indicates whether this module is a standard module.
Examples for standard modules are "limits", "anno", "state", "math", "tex", "noise", and "df".
|
pure virtual |
Returns true if all imports of the module are valid.
A module can become invalid if an (directly or indirectly) imported module has been reloaded. It might be possible to make an invalid module valid again by reloading all related import chains, or simpler by reloading this module recursively.
| context | Execution context that can be queried for error messages after the operation has finished. Can be nullptr. |
true if valid, or false otherwise.
|
pure virtual |
Reload the module from disk.
| context | In case of failure, the execution context can be checked for error messages. Can be nullptr. |
| recursive | If true, all imported file-based modules are reloaded prior to this one. |
|
pure virtual |
Reload the module from string.
mdl::base and mdl::nvidia::distilling_support cannot be reloaded.| module_source | The module source code. |
| recursive | If true, all imported file-based modules are reloaded prior to this one. |
| context | In case of failure, the execution context can be checked for error messages. Can be nullptr. |