mi::neuraylib::IMdl_entity_resolver Class Reference
[Miscellaneous MDL-related Interfaces]
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()
Public Member Functions
- virtual IMdl_resolved_module* 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) =0
- Resolves a module name. More...
- virtual IMdl_resolved_resource* 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) =0
- Resolves a resource file path. More...
Member Functions
- 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_name
- The relative or absolute MDL module name to resolve.
- owner_file_path
- The optional file path of the owner (or NULL if not available).
- owner_name
- The absolute name of the owner (or NULL if not available).
- pos_line
- The line of the corresponding source code location (or 0 if not available).
- pos_column
- The column of the corresponding source code location (or 0 if not available).
- context
- The 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 is also used to resolve file paths with masks for animated textures and/or uvtile textures, resulting in a resource with several elements and/or a resource element with multiple entities.
Parameters
- file_path
- The 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_path
- The optional file path of the owner (or NULL if not available).
- owner_name
- The absolute name of the owner (or NULL if not available).
- pos_line
- The line of the corresponding source code location (or 0 if not available).
- pos_column
- The column of the corresponding source code location (or 0 if not available).
- context
- The execution context which can be used to retrieve messages.
Returns
A description of the resolved resource, or NULL in case of errors.