MDL SDK API nvidia_logo_transpbg.gif Up
mi::neuraylib::IMdl_entity_resolver Class Referenceabstract

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

#include <imdl_entity_resolver.h>

Inheritance diagram for mi::neuraylib::IMdl_entity_resolver:

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...
 
- 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 IInterfaceget_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 IInterfaceget_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< 0xfe6e553a, ... >
typedef Interface_declare< id1, ... > Self
 Own type. More...
 
typedef Uuid_t< id1, ... > IID
 Declares the interface ID (IID) of this interface. More...
 
- Public Types inherited from mi::base::IInterface
typedef Uuid_t<0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0> IID
 Declares the interface ID (IID) of this interface. More...
 
- Static Public Member Functions inherited from mi::base::Interface_declare< 0xfe6e553a, ... >
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...
 

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

 resolve_module()

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.

 resolve_resource()

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_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.