mi::neuraylib::IMdl_module Class Reference
[Materials (MDL)]
Description
This interfaces represents an MDL module.
See also:
mi::neuraylib::IMdl_material_definition, mi::neuraylib::IMdl_material_instance
mi::neuraylib::IMdl_function_definition, mi::neuraylib::IMdl_function_call
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_function( Uint32 index) const =0
- Returns the DB name of the function definition at index. More...
- virtual Uint32 get_function_count() const =0
- Returns the number of function definitions exported by the module. More...
- virtual const IArray* get_function_overloads( const char* name, const IAttribute_container* arguments = 0) const =0
- Returns overloads of a function definition. More...
- virtual const IArray* get_function_overloads( const char* name, const char* param_sig) const =0
- Returns overloads of a function definition. More...
- virtual const char* get_import( Uint32 index) const =0
- Returns the DB name of the imported module at index. More...
- virtual Uint32 get_import_count() const =0
- Returns the number of modules imported by the module. More...
- virtual const char* get_material( Uint32 index) const =0
- Returns the DB name of the material definition at index. More...
- virtual Uint32 get_material_count() const =0
- Returns the number of material definitions exported by the module. More...
- virtual const char* get_name() const =0
- Returns the MDL name of the module. More...
- virtual bool is_standard_module() const =0
- Indicates whether this module is a standard module. More...
Member Functions
- virtual const char* mi::neuraylib::IMdl_module::get_filename() const [pure virtual]
-
Returns the name of the MDL source file from which this module was created.
Returns
The full pathname of the source file from which this MDL module was created, or NULL if no such file exists.
- virtual const char* mi::neuraylib::IMdl_module::get_function( Uint32 index) const [pure virtual]
-
Returns the DB name of the function definition at index.
Parameters
- index
- The index of the function definition.
Returns
The DB name of the function definition. The method may return NULL for valid indices if the corresponding function definition has already been removed from the DB.
- virtual Uint32 mi::neuraylib::IMdl_module::get_function_count() const [pure virtual]
-
Returns the number of function definitions exported by the module.
Returns
The number of function definitions.
- virtual const IArray* mi::neuraylib::IMdl_module::get_function_overloads( const char* name, const IAttribute_container* arguments = 0) const [pure virtual]
-
Returns overloads of a function definition. The method returns overloads of function definition of this module, either all overloads or just the overloads matching a given set of arguments.
Parameters
- name
- The DB name of a function definition from this module. Due to the nature of this method the function signature (starting with the left parenthesis) is irrelevant and thus optional.
- arguments
- Optional arguments to select a specific overload. If present, the method returns only the overloads of name whose signature matches the provided arguments, i.e., a call to mi::neuraylib::IMdl_function_definition::create_function_call() with these arguments would succeed.
Returns
The DB names of overloads of the given function definition, or NULL if name is invalid.
- virtual const IArray* mi::neuraylib::IMdl_module::get_function_overloads( const char* name, const char* param_sig) const [pure virtual]
-
Returns overloads of a function definition. The method returns the best-matching overloads of a function definition of this module, given a list of positional parameter types.
Parameters
- name
- The DB name of a function definition from this module without signature.
- param_sig
- A parameter signature as a comma separated string of MDL type names. The method returns only the overloads of name whose signature matches the provided positional parameter types. In addition, it returns only the best-matching overloads according to the MDL rules for overload resolution. Optionally, the parameter signature can be enclosed in parentheses.
Returns
The DB names of overloads of the given function definition, or NULL if name is invalid.
- virtual const char* mi::neuraylib::IMdl_module::get_import( Uint32 index) const [pure virtual]
-
Returns the DB name of the imported module at index.
Parameters
- index
- The index of the imported module.
Returns
The DB name of the imported module.
- virtual Uint32 mi::neuraylib::IMdl_module::get_import_count() const [pure virtual]
-
Returns the number of modules imported by the module.
Returns
The number of imported modules.
- virtual const char* mi::neuraylib::IMdl_module::get_material( Uint32 index) const [pure virtual]
-
Returns the DB name of the material definition at index.
Parameters
- index
- The index of the material definition.
Returns
The DB name of the material definition. The method may return NULL for valid indices if the corresponding material definition has already been removed from the DB.
- virtual Uint32 mi::neuraylib::IMdl_module::get_material_count() const [pure virtual]
-
Returns the number of material definitions exported by the module.
Returns
The number of material definitions.
- virtual const char* mi::neuraylib::IMdl_module::get_name() const [pure virtual]
-
Returns the MDL name of the module.
Note:The MDL name of the module is different from the name of the DB element. Use mi::neuraylib::IMdl_compiler::name_of() to obtain the name of the DB element.
Returns
The MDL name of the module.
- virtual bool mi::neuraylib::IMdl_module::is_standard_module() const [pure virtual]
-
Indicates whether this module is a standard module. Examples for standard modules are "limits", "anno", "state", "math", "tex", "noise", and "df".