MDL SDK API nvidia_logo_transpbg.gif Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mi::neuraylib::IMdl_entity_resolver Class Referenceabstract

The entity resolver is used to resolve MDL modules and resources in such modules. More...

Inheritance diagram for mi::neuraylib::IMdl_entity_resolver:
mi::base::Interface_declare< 0xfe6e553a, 0x6a1f, 0x4300, 0xb5, 0x46, 0x96, 0xc8, 0xee, 0x12, 0xcf, 0x95 > mi::base::IInterface

Public Member Functions

virtual IMdl_resolved_moduleresolve_module (const char *module_name, const char *owner_file_path, const char *owner_name, Sint32 pos_line, Sint32 pos_column, IMdl_execution_context *context=0)=0
 Resolves a module name. More...
 
virtual IMdl_resolved_resourceresolve_resource (const char *file_path, const char *owner_file_path, const char *owner_name, Sint32 pos_line, Sint32 pos_column, IMdl_execution_context *context=0)=0
 Resolves a resource file path. More...
 

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0xfe6e553a, 0x6a1f, 0x4300, 0xb5, 0x46, 0x96, 0xc8, 0xee, 0x12, 0xcf, 0x95 >
typedef Interface_declare< id1,
id2, id3, id4, id5, id6, id7,
id8, id9, id10, id11,
IInterface
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< 0xfe6e553a, 0x6a1f, 0x4300, 0xb5, 0x46, 0x96, 0xc8, 0xee, 0x12, 0xcf, 0x95 >
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

The entity resolver is used to resolve MDL modules and resources in such modules.

This interface is used in two ways: (a) to make the resolver of the MDL compiler available to users, and (b) to control how the MDL compiler resolves modules and resources.

See Also
mi::neuraylib::IMdl_configuration::get_entity_resolver(), mi::neuraylib::IMdl_configuration::set_entity_resolver()

Member Function Documentation

virtual IMdl_resolved_module* mi::neuraylib::IMdl_entity_resolver::resolve_module ( const char *  module_name,
const char *  owner_file_path,
const char *  owner_name,
Sint32  pos_line,
Sint32  pos_column,
IMdl_execution_context context = 0 
)
pure virtual

Resolves a module name.

If owner_name and owner_file_path are not provided, no relative module names can be resolved.

Parameters
module_nameThe relative or absolute MDL module name to resolve.
owner_file_pathThe optional file path of the owner (or NULL if not available).
owner_nameThe absolute name of the owner (or NULL if not available).
pos_lineThe line of the corresponding source code location (or 0 if not available).
pos_columnThe column of the corresponding source code location (or 0 if not available).
contextThe execution context which can be used to retrieve messages.
Returns
A description of the resolved module, or NULL in case of errors.
virtual IMdl_resolved_resource* mi::neuraylib::IMdl_entity_resolver::resolve_resource ( const char *  file_path,
const char *  owner_file_path,
const char *  owner_name,
Sint32  pos_line,
Sint32  pos_column,
IMdl_execution_context context = 0 
)
pure virtual

Resolves a resource file path.

If owner_name and owner_file_path are not provided, no relative paths can be resolved. The method can also be used to resolve files in an MDLE, e.g, to get a resource set for embedded UDIM textures.

Parameters
file_pathThe MDL file path of the resource to resolve. In addition, for resources from MDLE files, it is also possible to provide the absolute OS file system path to the MDLE file (with slashes instead of backslashes on Windows), followed by a colon, followed by the relative path inside the MDLE container.
owner_file_pathThe optional file path of the owner (or NULL if not available).
owner_nameThe absolute name of the owner (or NULL if not available).
pos_lineThe line of the corresponding source code location (or 0 if not available).
pos_columnThe column of the corresponding source code location (or 0 if not available).
contextThe execution context which can be used to retrieve messages.
Returns
A description of the resolved resource, or NULL in case of errors.