![]() |
VR-Forces 4.3 Class Documentation
|
Manager which owns element definitions.for one type of element Use the makVrv::DtElementDefinitionTypesManager to get each element definition manager. More...
Public Types | |
| typedef boost::unordered_map < DtUnicode, DtElementDefinitionNew * > | DefinitionMap |
| Map from element definition name to definition object. | |
| typedef std::vector< const DtElementDefinitionNew * > | ElementDefinitions |
| List of new element definitions. | |
Public Member Functions | |
| ~DtElementDefinitionManager () | |
| Destructor. | |
| const std::string & | name () const |
| Get the name of the element definition manager. | |
| const DtUnicode & | screenName () const |
| Get the screen name of the element definition manager. | |
| unsigned int | numberOfElementDefinitions () const |
| Get the number of element definitions. | |
| const DefinitionMap & | elementDefinitions () const |
| Get the element definitions. | |
| DtElementDefinitionNew * | findElementDefinition (const DtUnicode &definitionName) |
| Find an element definition by name. | |
| const DtElementDefinitionNew * | findElementDefinition (const DtUnicode &definitionName) const |
| Find an element definition by name. | |
| DtElementDefinitionNew * | createElementDefinition (const DtUnicode &definitionName) |
| Create an element definition with a given name. | |
| DtElementDefinitionNew * | createElementDefinition (const DtUnicode &definitionName, DtElementDefinitionNew *parentDefinition) |
| Create an element definition with a given name, that inherits an existing definition. | |
| void | destroyElementDefinition (DtElementDefinitionNew *) |
| Destroy an element definition, any inherited definitions will now be Parented under destroyed element's parent. | |
| void | destroyElementDefinitionAndChildren (DtElementDefinitionNew *) |
| Destroys an element definition and all of it's child definitions. | |
| DtElementDefinitionNew * | copyElementDefinition (DtElementDefinitionNew &def, const DtUnicode &newName) |
| Create a copy of an element definition, with a new name. | |
| DtBackupInterface * | backup () |
| Get the backup object. | |
| bool | renameElementDefinition (const DtUnicode &oldName, const DtUnicode &newName) |
| Rename an element definition. | |
| void | loadDefaults () |
| Load the default definitions. | |
| void | loadDefaults (bool loadOnlyFactory) |
| Load the default definitions. | |
| void | revertSettings () |
| Revert to startup settings. | |
| virtual void | saveAsDefaults () |
| Called to save the current definitions as the defaults. | |
| virtual void | exportSettings (const std::string &fileName) |
| Export settings to the named file. | |
| virtual void | importSettings (const std::string &fileName, ElementDefinitions &addedDefinitions, ElementDefinitions &skippedDefinitions) |
| Import settings from the named file Fills addedDefinitions with definitions successfully added Fills skippedDefinitions with definitions that could not be added and were different from any existing definition with the same name. | |
| virtual void | importSettings (const std::string &fileName) |
| Import settings from the named file. | |
| virtual void | mergeSettings (const std::string &fileName, ElementDefinitions &addedDefinitions, ElementDefinitions &skippedDefinitions) |
| Merge settings from the named file Fills addedDefinitions with definitions successfully added Fills skippedDefinitions with definitions that could not be added and were different from any existing definition with the same name. | |
| virtual DtDeSettings * | settings () |
| Get the settings object that manages element definitions on disk. | |
| virtual void | setFromRecord (const makArchives::DtElementsRecord &rec) |
| Set the element definitions from a record. | |
| virtual void | setFromRecord (const makArchives::DtElementsRecord &rec, ElementDefinitions &addedDefinitions, ElementDefinitions &skippedDefinitions) |
| Set the element definitions from a record Fills addedDefinitions with definitions successfully added Fills skippedDefinitions with definitions that could not be added and were different from any existing definition with the same name. | |
| virtual void | mergeRecord (const makArchives::DtElementsRecord &rec, ElementDefinitions &addedDefinitions, ElementDefinitions &skippedDefinitions) |
| Merge in the element definitions from a record Returns a list of the new elements. | |
| virtual void | getRecord (makArchives::DtElementsRecord &rec) |
| Fill in a record with the current definitions. | |
| virtual void | setAutoSave (bool enabled) |
| Set whether the manager saves itself out as default when changed. | |
| virtual bool | validateElementDefinition (const DtElementDefinitionNew &def) |
| Validate an element definition against its registered schema validator, if any. | |
Static Public Member Functions | |
| static const DtElementDefinitionManager * | createConstCopy (const DtElementDefinitionManager &orig) |
| Create a constant copy for use in separate threads. | |
Protected Types | |
| typedef std::vector< const makArchives::DtElementDefinitionRecord * > | ElementGroup |
| A group of element definition records, used for the following map. | |
| typedef std::map< DtUnicode, ElementGroup > | ParentToElementsMap |
| Map from parent element definition name to a group of elements Used to reconstruct the element hierarchy from a flat record in the following functions. | |
| typedef std::map< std::string, DtVisualizerDefinitionValidator * > | VisualizerDefinitionValidatorMap |
| typedef DtRecordSettingsBackup < DtElementDefinitionManager, makArchives::DtElementsRecord > | ElementDefinitionsBackup |
Protected Member Functions | |
| DtElementDefinitionManager (const std::string &name, const DtUnicode &screenName, DtDe &de, bool procedural) | |
| Constructor. | |
| DtElementDefinitionManager (const DtElementDefinitionManager &rhs) | |
| Copy constructor.o. | |
| void | registerDefinitionHierarchy (DtElementDefinitionNew *root) |
| Internal function to register a hierarchy. | |
| void | setFromOldRecord (const makArchives::oldRecords::DtElementDefinitionHierarchy &oldRe, ElementDefinitions &addedDefinitions, ElementDefinitions &skippedDefinitions) |
| Load an old element definition hierarchy record Fills addedDefinitions with definitions successfully added Fills skippedDefinitions with definitions that could not be added. | |
| void | loadOldDefinitionNode (DtElementDefinitionNew *parent, const makArchives::oldRecords::DtElementDefinitionNode &oldDef, ElementDefinitions &addedDefinitions, ElementDefinitions &skippedDefinitions) |
| Load an old element definition node record (and its subtree) into the manager, under the specified parent definition. | |
| void | buildDefinitionSetsFromOldRecord (DtElementDefinitionNew &newElem, const makArchives::oldRecords::DtElementDefinition &oldElem) |
| build definition sets for a new element definition from an old definition record | |
| virtual void | buildElementVisualizers (DtElementDefinitionNew &ed, const makArchives::DtElementDefinitionRecord &rec) |
| Build the visualizer definition sets for an element from its record. | |
| virtual void | buildElementChildren (DtElementDefinitionNew &ed, ParentToElementsMap &parentToElementsMap, ElementDefinitions &addedDefinitions, ElementDefinitions &skippedDefinitions) |
| Recursively create the child element definitions for an element using a map from parent names to child records. | |
| virtual void | registerBackup () |
| register the settings backup after the de has initialized the shared settings object | |
| virtual bool | recordMatchesDefinition (const makArchives::DtElementDefinitionRecord *childRec, const DtElementDefinitionNew *existingChildDef) const |
Static Protected Member Functions | |
| static DtVisualizerAttribute * | attributeFromOldRecord (const makArchives::oldRecords::DtVisualAttributeInterface *attributeRecord) |
| Convert an old visualizer attribute record into a new attribute. | |
| static makArchives::DtElementDefinitionRecord | buildElementDefinitionRecord (DtElementDefinitionNew &elementDef) |
| Utility function to construct an element definition record from an element definition object. | |
Protected Attributes | |
| VisualizerDefinitionValidatorMap | myValidators |
| std::string | myName |
| DtUnicode | myScreenName |
| DtDe * | myOptionalDe |
| DefinitionMap | myDefinitions |
| bool | myProceduralFlag |
| bool | myAutoSave |
| ElementDefinitionsBackup * | myBackup |
Private Member Functions | |
| DtElementDefinitionManager () | |
| Default constructor. | |
| DtElementDefinitionManager & | operator= (const DtElementDefinitionManager &) |
| Assignment Operator. | |
Friends | |
| class | DtElementDefinitionTypeManager |
Manager which owns element definitions.for one type of element Use the makVrv::DtElementDefinitionTypesManager to get each element definition manager.
| typedef boost::unordered_map<DtUnicode,DtElementDefinitionNew*> makVrv::DtElementDefinitionManager::DefinitionMap |
Map from element definition name to definition object.
| typedef std::vector<const DtElementDefinitionNew*> makVrv::DtElementDefinitionManager::ElementDefinitions |
List of new element definitions.
|
protected |
A group of element definition records, used for the following map.
|
protected |
Map from parent element definition name to a group of elements Used to reconstruct the element hierarchy from a flat record in the following functions.
|
protected |
|
protected |
| makVrv::DtElementDefinitionManager::~DtElementDefinitionManager | ( | ) |
Destructor.
|
protected |
Constructor.
|
protected |
Copy constructor.o.
|
private |
Default constructor.
|
static |
Create a constant copy for use in separate threads.
| const std::string& makVrv::DtElementDefinitionManager::name | ( | ) | const |
Get the name of the element definition manager.
This name is used to uniquely specify file names.
| const DtUnicode& makVrv::DtElementDefinitionManager::screenName | ( | ) | const |
Get the screen name of the element definition manager.
This name is display the name of the element type to the user.
| unsigned int makVrv::DtElementDefinitionManager::numberOfElementDefinitions | ( | ) | const |
Get the number of element definitions.
| const DefinitionMap& makVrv::DtElementDefinitionManager::elementDefinitions | ( | ) | const |
Get the element definitions.
This map will change if there are any calls to create or destroy elements. Those calls may invalidate any iterators obtained from the map.
| DtElementDefinitionNew* makVrv::DtElementDefinitionManager::findElementDefinition | ( | const DtUnicode & | definitionName | ) |
Find an element definition by name.
| const DtElementDefinitionNew* makVrv::DtElementDefinitionManager::findElementDefinition | ( | const DtUnicode & | definitionName | ) | const |
Find an element definition by name.
| DtElementDefinitionNew* makVrv::DtElementDefinitionManager::createElementDefinition | ( | const DtUnicode & | definitionName | ) |
Create an element definition with a given name.
| DtElementDefinitionNew* makVrv::DtElementDefinitionManager::createElementDefinition | ( | const DtUnicode & | definitionName, |
| DtElementDefinitionNew * | parentDefinition | ||
| ) |
Create an element definition with a given name, that inherits an existing definition.
| void makVrv::DtElementDefinitionManager::destroyElementDefinition | ( | DtElementDefinitionNew * | ) |
Destroy an element definition, any inherited definitions will now be Parented under destroyed element's parent.
| void makVrv::DtElementDefinitionManager::destroyElementDefinitionAndChildren | ( | DtElementDefinitionNew * | ) |
Destroys an element definition and all of it's child definitions.
| DtElementDefinitionNew* makVrv::DtElementDefinitionManager::copyElementDefinition | ( | DtElementDefinitionNew & | def, |
| const DtUnicode & | newName | ||
| ) |
Create a copy of an element definition, with a new name.
The element definition must not be inherited by any other definitions to be copyable. The new definition will share the same parent as the source definition.
| DtBackupInterface* makVrv::DtElementDefinitionManager::backup | ( | ) |
Get the backup object.
| bool makVrv::DtElementDefinitionManager::renameElementDefinition | ( | const DtUnicode & | oldName, |
| const DtUnicode & | newName | ||
| ) |
Rename an element definition.
| void makVrv::DtElementDefinitionManager::loadDefaults | ( | ) |
Load the default definitions.
| void makVrv::DtElementDefinitionManager::loadDefaults | ( | bool | loadOnlyFactory | ) |
Load the default definitions.
| void makVrv::DtElementDefinitionManager::revertSettings | ( | ) |
Revert to startup settings.
|
virtual |
Called to save the current definitions as the defaults.
|
virtual |
Export settings to the named file.
|
virtual |
Import settings from the named file Fills addedDefinitions with definitions successfully added Fills skippedDefinitions with definitions that could not be added and were different from any existing definition with the same name.
|
virtual |
Import settings from the named file.
|
virtual |
Merge settings from the named file Fills addedDefinitions with definitions successfully added Fills skippedDefinitions with definitions that could not be added and were different from any existing definition with the same name.
|
virtual |
Get the settings object that manages element definitions on disk.
|
virtual |
Set the element definitions from a record.
|
virtual |
Set the element definitions from a record Fills addedDefinitions with definitions successfully added Fills skippedDefinitions with definitions that could not be added and were different from any existing definition with the same name.
|
virtual |
Merge in the element definitions from a record Returns a list of the new elements.
|
virtual |
Fill in a record with the current definitions.
|
virtual |
Set whether the manager saves itself out as default when changed.
|
virtual |
Validate an element definition against its registered schema validator, if any.
|
protected |
Internal function to register a hierarchy.
|
staticprotected |
Convert an old visualizer attribute record into a new attribute.
|
protected |
Load an old element definition hierarchy record Fills addedDefinitions with definitions successfully added Fills skippedDefinitions with definitions that could not be added.
|
protected |
Load an old element definition node record (and its subtree) into the manager, under the specified parent definition.
Passing a null parent loads the subtree with no parent (as a root node) Fills addedDefinitions with definitions successfully added Fills skippedDefinitions with definitions that could not be added
|
protected |
build definition sets for a new element definition from an old definition record
|
protectedvirtual |
Build the visualizer definition sets for an element from its record.
|
protectedvirtual |
Recursively create the child element definitions for an element using a map from parent names to child records.
|
staticprotected |
Utility function to construct an element definition record from an element definition object.
|
protectedvirtual |
register the settings backup after the de has initialized the shared settings object
|
protectedvirtual |
|
private |
Assignment Operator.
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |