HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VOP_TypeDefinitionFile Class Reference

Represents a source of vop type definitions saved in files or inside HDAs. More...

#include <VOP_TypeDefinitionFile.h>

+ Inheritance diagram for VOP_TypeDefinitionFile:

Public Member Functions

 VOP_TypeDefinitionFile (const char *file_path)
 
virtual void getSourcePath (UT_String &path) const
 Gets the definition source file path. More...
 
const UT_StringgetFilePath () 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...
 
virtual VOP_TypeDefinitionHandle getTypeDefinition (const char *type_name)
 Returns a type definition object found in the file at load time. More...
 
void getTypeDefinitionNames (UT_StringArray &type_names) const
 Obtains the list of type definition names provided by this source. 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...
 
- Public Member Functions inherited from VOP_TypeDefinitionSource
 VOP_TypeDefinitionSource ()
 Constructor and destructor. More...
 
virtual ~VOP_TypeDefinitionSource ()
 
void setRegisteredMgr (VOP_LanguageManager *mgr)
 

Detailed Description

Represents a source of vop type definitions saved in files or inside HDAs.

Definition at line 30 of file VOP_TypeDefinitionFile.h.

Constructor & Destructor Documentation

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.

Member Function Documentation

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
virtual void VOP_TypeDefinitionFile::getSourcePath ( UT_String path) const
virtual

Gets the definition source file path.

Reimplemented from VOP_TypeDefinitionSource.

virtual VOP_TypeDefinitionHandle VOP_TypeDefinitionFile::getTypeDefinition ( const char *  type_name)
virtual

Returns a type definition object found in the file at load time.

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


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