Material Definition Language API nvidia_logo_transpbg.gif Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mi::neuraylib::IModule Class Referenceabstract

This interface represents an MDL module. More...

Inheritance diagram for mi::neuraylib::IModule:
mi::base::Interface_declare< 0xe283b0ee, 0x712b, 0x4bdb, 0xa2, 0x13, 0x32, 0x77, 0x7a, 0x98, 0xf9, 0xa6, neuraylib::IScene_element > mi::neuraylib::IScene_element mi::base::Interface_declare< 0x8a2a4da9, 0xe323, 0x452c, 0xb8, 0xda, 0x92, 0x45, 0x67, 0x85, 0xd7, 0x78, neuraylib::IAttribute_set > mi::neuraylib::IAttribute_set mi::base::Interface_declare< 0x1bcb8d48, 0x10c1, 0x4b3e, 0x9b, 0xfa, 0x06, 0x23, 0x61, 0x81, 0xd3, 0xe1 > mi::base::IInterface

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_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 IType_listget_types () const =0
 Returns the types exported by this module. More...
 
virtual const IValue_listget_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 IType_resourceget_resource_type (Size index) const =0
 Returns the type of the resource at index. More...
 
virtual const char * get_resource_mdl_file_path (Size index) const =0
 Returns the absolute MDL file path of the resource at index. More...
 
virtual const char * get_resource_name (Size index) const =0
 Returns the database name of the resource at index. More...
 
virtual const IAnnotation_blockget_annotations () const =0
 Returns the annotations of the module, or NULL if there are no such annotations. More...
 
virtual bool is_standard_module () const =0
 Indicates whether this module is a standard module. More...
 
virtual const IArrayget_function_overloads (const char *name, const IExpression_list *arguments=0) const =0
 Returns overloads of a function definition. More...
 
virtual const IArrayget_function_overloads (const char *name, const char *param_sig) const =0
 Returns overloads of a function definition. More...
 

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0xe283b0ee, 0x712b, 0x4bdb, 0xa2, 0x13, 0x32, 0x77, 0x7a, 0x98, 0xf9, 0xa6, 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< 0xe283b0ee, 0x712b, 0x4bdb, 0xa2, 0x13, 0x32, 0x77, 0x7a, 0x98, 0xf9, 0xa6, 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...
 

Detailed Description

Member Function Documentation

virtual const IAnnotation_block* mi::neuraylib::IModule::get_annotations ( ) const
pure virtual

Returns the annotations of the module, or NULL if there are no such annotations.

virtual const IValue_list* mi::neuraylib::IModule::get_constants ( ) const
pure virtual

Returns the constants exported by this module.

virtual const char* mi::neuraylib::IModule::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::IModule::get_function ( Size  index) const
pure virtual

Returns the DB name of the function definition at index.

Parameters
indexThe 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 Size mi::neuraylib::IModule::get_function_count ( ) const
pure virtual

Returns the number of function definitions exported by the module.

virtual const IArray* mi::neuraylib::IModule::get_function_overloads ( const char *  name,
const IExpression_list 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
nameThe 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.
argumentsOptional 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::IFunction_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::IModule::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
nameThe DB name of a function definition from this module without signature.
param_sigA 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::IModule::get_import ( Size  index) const
pure virtual

Returns the DB name of the imported module at index.

Parameters
indexThe index of the imported module.
Returns
The DB name of the imported module.
virtual Size mi::neuraylib::IModule::get_import_count ( ) const
pure virtual

Returns the number of modules imported by the module.

virtual const char* mi::neuraylib::IModule::get_material ( Size  index) const
pure virtual

Returns the DB name of the material definition at index.

Parameters
indexThe 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 Size mi::neuraylib::IModule::get_material_count ( ) const
pure virtual

Returns the number of material definitions exported by the module.

virtual const char* mi::neuraylib::IModule::get_mdl_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::ITransaction::name_of() to obtain the name of the DB element.
Returns
The MDL name of the module.
virtual const char* mi::neuraylib::IModule::get_resource_mdl_file_path ( Size  index) const
pure virtual

Returns the absolute MDL file path of the resource at index.

Parameters
indexThe index of the resource.
Returns
The absolute MDL file path of the resource.
virtual const char* mi::neuraylib::IModule::get_resource_name ( Size  index) const
pure virtual

Returns the database name of the resource at index.

Parameters
indexThe index of the resource.
Returns
The database name of the resource or NULL if this resource could not be resolved.
virtual const IType_resource* mi::neuraylib::IModule::get_resource_type ( Size  index) const
pure virtual

Returns the type of the resource at index.

Parameters
indexThe index of the resource.
Returns
The type of the resource.
virtual Size mi::neuraylib::IModule::get_resources_count ( ) const
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.

virtual const IType_list* mi::neuraylib::IModule::get_types ( ) const
pure virtual

Returns the types exported by this module.

virtual bool mi::neuraylib::IModule::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".