RixResourceResolver Class Reference

RixResourceResolver Class Referenceabstract
Inheritance diagram for RixResourceResolver:
RixInterface

Public Types

enum  ResourceType {
  k_Shader =0, k_Texture, k_Archive, k_Display,
  k_Procedural, k_RifFilter, k_RixPlugin
}
 

Public Member Functions

virtual char const * GetResourcePaths (ResourceType)=0
 
virtual int ResolveResource (ResourceType, char const *nm, char result[], int maxlen)=0
 
- Public Member Functions inherited from RixInterface
virtual int GetVersion () const
 

Additional Inherited Members

- Protected Member Functions inherited from RixInterface
 RixInterface (int version)
 Interfaces should not be constructed by users.
 
virtual ~RixInterface ()
 Interfaces should not be deleted by users.
 
- Protected Attributes inherited from RixInterface
int m_version
 Version number of this interface.
 

Member Function Documentation

virtual char const* RixResourceResolver::GetResourcePaths ( ResourceType  )
pure virtual

GetResourcePaths returns a ':' separated string representing filesystem directories to search for the requested resource type.

virtual int RixResourceResolver::ResolveResource ( ResourceType  ,
char const *  nm,
char  result[],
int  maxlen 
)
pure virtual

ResolveResource searches for the specified resource and returns the fully qualified filename of the resource. If the resource can't be found nonzero error code is returned. Note that we follow the same file extension inference rules as does the renderer. Thus nm can be a relative filepath and may or may not require a file extension according to standard RenderMan conventions. If it works in RIB it should work here. Result should be allocated large enough to contain a fully-qualified pathname... Should the resulting file be found but not fit in the provided buffer, we return a positive error code indicated the required length. We return a negative error code, if the file not be found.


The documentation for this class was generated from the following file: