VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions
makVrf::DtVrfElementDefinitionManager Class Reference

Specialize class used by the vrf version of the element definition type manager+. More...

Inheritance diagram for makVrf::DtVrfElementDefinitionManager:
Inheritance graph
[legend]

Public Member Functions

 DtVrfElementDefinitionManager (const std::string &name, const makVrv::DtUnicode &screenName, makVrv::DtDe &de, bool procedural)
 CTOR.
 DtVrfElementDefinitionManager (const DtElementDefinitionManager &orig)
virtual ~DtVrfElementDefinitionManager ()
virtual void resetNumberOfStartupDefinitions ()
virtual bool canUseHierLeaf ()
 Are these element definitions using the .hier/.leaf setup?
- Public Member Functions inherited from makVrv::DtElementDefinitionManager
virtual ~DtElementDefinitionManager ()
 Destructor.
const std::string & name () const
 Get the name of the element definition manager.
const DtUnicodescreenName () const
 Get the screen name of the element definition manager.
unsigned int numberOfElementDefinitions () const
 Get the number of element definitions.
const DefinitionMapelementDefinitions () const
 Get the element definitions.
DtElementDefinitionNewfindElementDefinition (const DtUnicode &definitionName)
 Find an element definition by name.
const DtElementDefinitionNewfindElementDefinition (const DtUnicode &definitionName) const
 Find an element definition by name.
DtElementDefinitionNewcreateElementDefinition (const DtUnicode &definitionName)
 Create an element definition with a given name.
DtElementDefinitionNewcreateElementDefinition (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.
DtElementDefinitionNewcopyElementDefinition (DtElementDefinitionNew &def, const DtUnicode &newName)
 Create a copy of an element definition, with a new name.
DtBackupInterfacebackup ()
 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.
virtual std::vector< std::string > retrieveHierFilesToMerge (std::string type)
 For command line arguments, list of .hier files from command line for this type (entity, aggregate, tactical graphics, etc)
virtual std::vector< std::string > retrieveLeafFilesToMerge (std::string type)
 For command line arguments, list of .leaf files from command line for this type (entity, aggregate, tactical graphics, etc)
virtual bool shouldSkipDefLoading ()
 Given command line parameters, should we skip loading definitions from the usual place (currently entity, aggregate, tactical graphics can skip)
void revertSettings ()
 Revert to startup settings.
virtual void saveAsDefaults ()
 Called to save the current definitions as the defaults.
virtual void splitAndWriteToDir (makArchives::DtElementsRecord &elementsRec, std::string existingDirName)
 Write records as .hier/.leaf to an existing directory.
virtual void exportSettings (const std::string &fileOrDirName)
 Export settings to the named file.
virtual void exportHierSettings (const std::string &fileName)
 Export hierarchy to the named file.
virtual void exportLeafSettings (const std::string &fileName)
 Export leafs to the name file (elements with no children)
virtual void exportSelectedLeafSettings (std::vector< std::string > &names, const std::string &fileName)
 Export Selected leafs to the name file (elements with no children)
void createFolderFromPathAndSplit (const std::string &fileOrDirName, std::string &newPath, std::string &dirName)
 For saving out element definitions, make a folder and write a file for the hierarchy, and one for the leaf element definitions.
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 mergeHierSettings (const std::string &hierFileOrDirName)
 Merge in a .hier file or directory that contains .hier files.
virtual void mergeHierSettings (const std::string &hierFileOrDirName, ElementDefinitions &addedDefinitions, ElementDefinitions &skippedDefinitions)
 Merge in a .hier file or directory that contains .hier files.
virtual void mergeLeafSettings (const std::string &leafFileOrDirName)
 Merge a .leaf file into the existing hierarchy Replace existing leaves and add new leaves.
virtual void mergeLeafSettings (const std::string &fileOrDirName, ElementDefinitions &addedDefinitions, ElementDefinitions &skippedDefinitions)
 Merge in a .hier file or directory that contains .hier files.
virtual void mergeSettings (const std::string &fileName, ElementDefinitions &addedDefinitions, ElementDefinitions &skippedDefinitions)
 Merge records from *.elem or *.leaf file.
virtual void markRecordsAsHier (makArchives::DtElementsRecord &rec)
 Mark all the element definitions in this record as belonging to the element hierarchy (used when records are split into hier/leaf files or when .elem is loaded)
virtual DtDeSettingssettings ()
 Get the settings object that manages element definitions on disk.
virtual void setFromRecord (const makArchives::DtElementsRecord &rec)
 Set the element definitions from a record will mark all hier DtelementsRecord as isHier() == true will not mark nodes it determines to be leaves as isHier()=false in case some of those nodes are desired to be in the hierarchy.
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 mergeHierRecord (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 mergeLeafRecord (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 getRecord (std::vector< std::string > elementDefinitions, makArchives::DtElementsRecord &rec)
 Fill in a record with the passed definitions.
virtual void getSplitRecord (std::vector< makArchives::DtElementsRecord > &rec, std::vector< std::string > &fileNames)
 Divide the single DefinitionMap into multiple pieces (hierarchy, leaves for this case) fileNames are root files names (.backup is appended)
virtual void addRecords (makArchives::DtElementsRecord &recs, makArchives::DtElementsRecord &combinedRec)
 Take element definitions and append them to the existing element definitions.
virtual void splitRecordElemMgr (makArchives::DtElementsRecord &rec, makArchives::DtElementsRecord &recHier, makArchives::DtElementsRecord &recLeaves)
 Take myDefinitions and split it into two DtElementsRecords One for leaf elements (elements with no children) and one just for hierarchy elements (non-leaf nodes) will mark all hier as hier (isHier() == true)
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.
virtual bool modifiedSinceStartup ()
 return whether the element definitions have modified since start up
virtual void addToModifiedDefinitionsMap (DtElementDefinitionNew *modelDefinition)
 add a model definition to the modifiedDefinitions map
virtual void addToAddedDefinitionsMap (DtElementDefinitionNew *modelDefinition)
 add a model definition to the addedDefinitions map
virtual void addToDeletedDefinitionsMap (DtElementDefinitionNew *modelDefinition)
 add a model definition to the deletedDefinitions map
virtual void resetModifiedFlags ()
 reset the flags about the modification after you have save it.

Additional Inherited Members

- Public Types inherited from makVrv::DtElementDefinitionManager
typedef std::map< DtUnicode,
DtElementDefinitionNew * > 
DefinitionMap
 Ordered map from element definition name to definition object.
typedef std::vector< const
DtElementDefinitionNew * > 
ElementDefinitions
 List of new element definitions.
typedef std::vector
< std::string >
::const_iterator 
ParentToElementIter
 Iterator for parent to element names.
- Static Public Member Functions inherited from makVrv::DtElementDefinitionManager
static const
DtElementDefinitionManager
createConstCopy (const DtElementDefinitionManager &orig)
 Create a constant copy for use in separate threads.
static
makArchives::DtElementDefinitionRecord 
buildElementDefinitionRecord (DtElementDefinitionNew &elementDef)
 Utility function to construct an element definition record from an element definition object.
- Protected Types inherited from makVrv::DtElementDefinitionManager
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 inherited from makVrv::DtElementDefinitionManager
 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.
virtual void buildElementVisualizers (DtElementDefinitionNew &ed, const makArchives::DtElementDefinitionRecord &rec)
 Build the visualizer definition sets for an element from its record.
virtual void buildElementVisualizersForModelSet (const makArchives::DtElementDefinitionRecord &rec, DtElementDefinitionNew &ed, int modelSet)
 Build the 2D, 3D, XR visualizers for a particular model set.
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
 Do all visualizers for all model sets match.
virtual bool recordMatchesDefinitionModelSet (const makArchives::DtElementDefinitionRecord *childRec, const DtElementDefinitionNew *existingChildDef, int modelSet) const
 Does (2D,3D,XR) match (2D,3D,XR) in another definition.
virtual void generateParentToElement (ParentToElementsMap &parentToElements, makArchives::DtElementsRecord &rec)
 Generate data structure mapping parent1 -> vec{child1, child2, child3}.
virtual bool checkRecordsAreLeavesInHier (ParentToElementsMap &parentToElements, std::vector< makArchives::DtElementsRecord > &recVec, std::vector< std::string > &leafFiles)
 Check if .leaf files contain only leaf nodes.
virtual bool replaceMergeLeaves (makArchives::DtElementsRecord &rec, std::vector< makArchives::DtElementsRecord > &recVec, const std::vector< std::string > &leafFiles)
 Load .leaf files and add/replace existing entries in the record.
virtual bool loadDefaultsFromHierLeafDir (makArchives::DtElementsRecord &rec)
 Load from appData/definitions/ElementDefinitions.
virtual bool isEntityDefinitions ()
 Since we are using folders for only entity element definitions this is a way to identify that case.
- Static Protected Member Functions inherited from makVrv::DtElementDefinitionManager
static void setupVisualizerDefs (makArchives::DtElementDefinitionRecord &elementRec, DtElementDefinitionNew &elementDef, unsigned int modelSet)
 Utility function to construct the visualizer definitions for 2D, 3D, XR.
- Protected Attributes inherited from makVrv::DtElementDefinitionManager
VisualizerDefinitionValidatorMap myValidators
std::string myName
std::string myHierName
std::string myLeafName
DtUnicode myScreenName
DtDemyOptionalDe
DefinitionMap myDefinitions
bool myProceduralFlag
bool myAutoSave
ElementDefinitionsBackupmyBackup
int myStartupNumOfDefinition
DefinitionMap myModifiedDefinitions
DefinitionMap myAddedDefinitions
DefinitionMap myDeletedDefinitions

Detailed Description

Specialize class used by the vrf version of the element definition type manager+.

Constructor & Destructor Documentation

makVrf::DtVrfElementDefinitionManager::DtVrfElementDefinitionManager ( const std::string &  name,
const makVrv::DtUnicode screenName,
makVrv::DtDe de,
bool  procedural 
)

CTOR.

makVrf::DtVrfElementDefinitionManager::DtVrfElementDefinitionManager ( const DtElementDefinitionManager orig)
virtual makVrf::DtVrfElementDefinitionManager::~DtVrfElementDefinitionManager ( )
virtual

Member Function Documentation

virtual void makVrf::DtVrfElementDefinitionManager::resetNumberOfStartupDefinitions ( )
virtual
virtual bool makVrf::DtVrfElementDefinitionManager::canUseHierLeaf ( )
virtual

Are these element definitions using the .hier/.leaf setup?

Reimplemented from makVrv::DtElementDefinitionManager.


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

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)