HDK
|
Represents a source of vop type definitions saved in files or inside HDAs. More...
#include <VOP_TypeDefinitionFile.h>
Public Member Functions | |
VOP_TypeDefinitionFile (const char *file_path) | |
void | getSourcePath (UT_String &path) const override |
Gets the definition source file path. More... | |
const UT_String & | getFilePath () const |
bool | load (const VOP_TypeDefinitionFactoryMap &factory_map, UT_String &errors) |
bool | save (UT_String &errors) const |
Saves the current data into the file. More... | |
void | getLanguageDefinitionNames (UT_StringArray &lang_names) const |
Obtains the list of language definition names provided by this source. More... | |
VOP_LanguageHandle | getLanguageDefinition (const char *language_name) override |
Returns a language definition provided by this source. More... | |
void | getTypeDefinitionNames (UT_StringArray &type_names) const |
Obtains the list of type definition names provided by this source. More... | |
VOP_TypeDefinitionHandle | getTypeDefinition (const char *type_name) override |
Returns a type definition object found in the file at load time. More... | |
void | addDefinition (VOP_TypeDefinitionHandle type_handle) |
Add a new definition to this source. More... | |
void | updateOrAddDefinition (const char *type_name, VOP_TypeDefinitionHandle type_handle) |
Update an old or add a new definition to this source. More... | |
bool | removeDefinition (const char *type_name) |
Delete the definition from the source. More... | |
bool | exists () const |
Tests some characteristics of the disk file this source represents. More... | |
bool | canRead () const |
Tests some characteristics of the disk file this source represents. More... | |
bool | canWrite () const |
Tests some characteristics of the disk file this source represents. More... | |
void | setAllowsEditingOfTypes (bool flag) |
Allows editing of types it provides in the default editor. More... | |
bool | allowsEditingOfTypes () const |
Allows editing of types it provides in the default editor. More... | |
![]() | |
VOP_TypeDefinitionSource () | |
Constructor and destructor. More... | |
virtual | ~VOP_TypeDefinitionSource () |
void | setRegisteredMgr (VOP_LanguageManager *mgr) |
Represents a source of vop type definitions saved in files or inside HDAs.
Definition at line 33 of file VOP_TypeDefinitionFile.h.
VOP_TypeDefinitionFile::VOP_TypeDefinitionFile | ( | const char * | file_path | ) |
Constructor. Note, still need to invoke load() before the object can provide info about the types defined in that file.
void VOP_TypeDefinitionFile::addDefinition | ( | VOP_TypeDefinitionHandle | type_handle | ) |
Add a new definition to this source.
bool VOP_TypeDefinitionFile::allowsEditingOfTypes | ( | ) | const |
Allows editing of types it provides in the default editor.
bool VOP_TypeDefinitionFile::canRead | ( | ) | const |
Tests some characteristics of the disk file this source represents.
bool VOP_TypeDefinitionFile::canWrite | ( | ) | const |
Tests some characteristics of the disk file this source represents.
bool VOP_TypeDefinitionFile::exists | ( | ) | const |
Tests some characteristics of the disk file this source represents.
const UT_String& VOP_TypeDefinitionFile::getFilePath | ( | ) | const |
|
overridevirtual |
Returns a language definition provided by this source.
Reimplemented from VOP_TypeDefinitionSource.
void VOP_TypeDefinitionFile::getLanguageDefinitionNames | ( | UT_StringArray & | lang_names | ) | const |
Obtains the list of language definition names provided by this source.
Gets the definition source file path.
Reimplemented from VOP_TypeDefinitionSource.
|
overridevirtual |
Returns a type definition object found in the file at load time.
Reimplemented from VOP_TypeDefinitionSource.
void VOP_TypeDefinitionFile::getTypeDefinitionNames | ( | UT_StringArray & | type_names | ) | const |
Obtains the list of type definition names provided by this source.
bool VOP_TypeDefinitionFile::load | ( | const VOP_TypeDefinitionFactoryMap & | factory_map, |
UT_String & | errors | ||
) |
Loads the necessary data from the file before this class provide information about type definitions from that file.
bool VOP_TypeDefinitionFile::removeDefinition | ( | const char * | type_name | ) |
Delete the definition from the source.
bool VOP_TypeDefinitionFile::save | ( | UT_String & | errors | ) | const |
Saves the current data into the file.
void VOP_TypeDefinitionFile::setAllowsEditingOfTypes | ( | bool | flag | ) |
Allows editing of types it provides in the default editor.
void VOP_TypeDefinitionFile::updateOrAddDefinition | ( | const char * | type_name, |
VOP_TypeDefinitionHandle | type_handle | ||
) |
Update an old or add a new definition to this source.