A class for handling files and HDAs as sources of vop type definitions.
More...
#include <VOP_TypeDefinitionFile.h>
A class for handling files and HDAs as sources of vop type definitions.
Definition at line 125 of file VOP_TypeDefinitionFile.h.
VOP_TypeDefinitionFileLoader::~VOP_TypeDefinitionFileLoader |
( |
| ) |
|
|
override |
void VOP_TypeDefinitionFileLoader::beginDeferUpdates |
( |
| ) |
|
Starts and ends a block of code in which the op table updates should not be handled. All the pending actions are performed only at the time the last endDeferHandlingUpdates() is called.
Sets a new type definition for a given type name.
- Parameters
-
old_type_name | The original name of the type to redefine. This should be NULL, if it's a brand new type. If the new definition has a new type name, this parameter contains the original (old) type name that is being renamed. |
type_handle | The handle to the type definition object. Manager will use it as the new definition for the type. The definition must have a valid non-empty type name string. |
source_path | The file where to save the type definition. If the old definition resided in another file, it is moved to this new file. If NULL, a default file will be used. |
errors | An outgoing string parameter that will contain error messages if manger encounters any problems. |
bool VOP_TypeDefinitionFileLoader::deleteType |
( |
const char * |
type_name | ) |
|
Deletes the definition from the source.
void VOP_TypeDefinitionFileLoader::endDeferUpdates |
( |
| ) |
|
Starts and ends a block of code in which the op table updates should not be handled. All the pending actions are performed only at the time the last endDeferHandlingUpdates() is called.
const char* VOP_TypeDefinitionFileLoader::getDefaultSourceFile |
( |
| ) |
const |
Gets the file path where the vop types are saved by default.
void VOP_TypeDefinitionFileLoader::loadDefinitionFilesInSearchPath |
( |
| ) |
|
Looks for the definition files in the search path and loads them.
bool VOP_TypeDefinitionFileLoader::loadFile |
( |
const char * |
file_path, |
|
|
UT_String & |
errors |
|
) |
| |
Loads the definitions from the specified file.
Virtual overrides from the base class. Respectively: monitoring for any new HDAs that appear in a table, keeping an eye on existing HDAs for anu updates, and making sure we handle deleted HDA operator types.
Reimplemented from OP_UpdateTemplatesSink.
void VOP_TypeDefinitionFileLoader::registerDefaultFactories |
( |
| ) |
|
Adds default factories to the map (eg, for "struct" metatype)
Registers a functor that creates a data type definition object associated with the given meta type name, when such meta type is encountered when reading and parsing a JSON file. After that the created object is given a chance to load itself from the definition JSON value.
void VOP_TypeDefinitionFileLoader::registerOperatorInterests |
( |
| ) |
|
Registers interests in tables and ops to monitor HDAs for their section that may define vop structs.
Virtual overrides from the base class. Respectively: monitoring for any new HDAs that appear in a table, keeping an eye on existing HDAs for anu updates, and making sure we handle deleted HDA operator types.
Implements OP_UpdateTableSink.
Virtual overrides from the base class. Respectively: monitoring for any new HDAs that appear in a table, keeping an eye on existing HDAs for anu updates, and making sure we handle deleted HDA operator types.
Implements OP_UpdateTemplatesSink.
Registers a functor that creates a data type definition object associated with the given meta type name, when such meta type is encountered when reading and parsing a JSON file. After that the created object is given a chance to load itself from the definition JSON value.
The documentation for this class was generated from the following file: