HDK
|
Cooks node data and makes it available through the reader. More...
#include <OP_FileResolver.h>
Public Member Functions | |
OP_FileResolver () | |
Constructor. More... | |
bool | getCanResolve (const char *name) override |
Checks if the resolver can provide the file data for the given name. More... | |
FS_Reader * | newReader (const FS_FileResolverOptions &opts, const char *name) override |
Creates a new reader object given the file (or data) name. More... | |
void | deleteReader (FS_Reader *reader) override |
void | acquireFilePath (const FS_FileResolverOptions &opts, const char *name, UT_String &file_path) override |
void | relinquishFilePath (const char *file_path) override |
int | getRevisionID (const char *name) override |
![]() | |
FS_FileResolver () | |
Constructor. More... | |
virtual | ~FS_FileResolver () |
Destructor. More... | |
virtual void | registerFile (const FS_FileResolverOptions &opts, const UT_StringHolder &name, UT_IStream &data) |
Additional Inherited Members | |
![]() | |
static void | setResolver (FS_FileResolver *resolver) |
Sets the instance that will resolve the operator paths to data files. More... | |
static FS_FileResolver * | getResolver () |
Returns the currently set resolver. More... | |
![]() | |
void | registerFile (const FS_FileResolverOptions &opts, const UT_StringHolder &name, const UT_StringHolder &file_path) |
void | unregisterFile (const UT_StringRef &name, bool delete_file) |
FS_ResolverFileEntry * | findFileInTable (const char *name) |
Cooks node data and makes it available through the reader.
Definition at line 27 of file OP_FileResolver.h.
OP_FileResolver::OP_FileResolver | ( | ) |
Constructor.
|
overridevirtual |
Obtains the file path to the data of a given name. On success, 'file_path' will contain a non-epnty file path. This file path should be then released using FS_FileResolver::relinquishFilePath().
opts | The options that describe the data. |
name | The name of the data available in the file. |
file_path | The output parameter which will have the path of the file that contains the data. If the request fails, the path will be an empty string. |
Implements FS_FileResolver.
Closes stream (if they are still open) and deletes the reader. After this call, the reader pointer will no longer be valid.
reader | The reader to be freed. |
Implements FS_FileResolver.
|
overridevirtual |
Checks if the resolver can provide the file data for the given name.
Implements FS_FileResolver.
Returns an instance-unique identifier for a path that can be used to check if the underlying resource data has changed, and should be re-read by the clients of this class.
name | The name of the data to get the identifier for. |
Implements FS_FileResolver.
|
overridevirtual |
Creates a new reader object given the file (or data) name.
The returned reader can be used to read the data, and when finished, it should be freed by passing it to the FS_FileResolver::deleteReader() method.
opts | The options that indicate how the data should be generated, if applicable. Eg, it contains the evaluation time for nodes or the file format in which the data should be available. |
name | The name of the data to be read. Can be a file specified with "file:/path" or an operator node data specified with "op:/path", or any other standard way of specifying data in Houdini. |
Implements FS_FileResolver.
Releases the file path and allows the resolver to (optionally) free the file resources.
file_path | The file path previously obtained with FS_FileResolver::acquireFilePath(). |
Implements FS_FileResolver.