VR-Forces 4.1 Class Documentation
List of all members | Public Member Functions | Protected Member Functions
DtFormationHierarchy Class Reference

The formation hierarchy is responsible for keeping track of the aggregate organization and formation. More...

Inheritance diagram for DtFormationHierarchy:
Inheritance graph
[legend]

Public Member Functions

 DtFormationHierarchy (QObject *parent=NULL)
virtual void setupFormation (DtFormation *, const DtString &formationName)
 Sets up the model datum to have the correct formation and returns the extent encompassed by the entities.
- Public Member Functions inherited from DtEchelonHierarchy
 DtEchelonHierarchy (QObject *parent=NULL)
 default constructor
virtual ~DtEchelonHierarchy ()
 destructor
virtual void init (const DtModelDataDict *dict)
 Connects to the model data dictionary.
virtual DtEchelonHierarchyNodenode (const QString &strKey) const
 Returns the node which corresponds to the key.
virtual void allDecendentsOf (const DtModelKey &key, QVector< DtModelKey > &resultList) const
 Returns the list of ModelKeys which are the decendents of node key in the resultList argument.
virtual void allImmediateDecendentsOf (const DtModelKey &key, QVector< DtModelKey > &resultList) const
 Returns a list of top level decendents of specified item.
virtual bool isSuperiorOf (const DtModelKey &superior, const DtModelKey &subordinate) const
 Returns true only if the superior is either a direct or indirect superior of the subordinant.
virtual const DtPtrQList
< DtEchelonHierarchyNode * > & 
nodeList () const
virtual const DtModelDataDictmodelDataDict () const
virtual void setAlwaysReconnectAllNodes (bool value)
 If set, all nodes will be reconnected each time a node is added.
virtual bool alwaysReconnectAllNodes () const
virtual void tick ()
 Sends queued node reparented signals.

Protected Member Functions

virtual void connectNode (DtEchelonHierarchyNode *n)
 Connects this node to the rest of the hierarchy.
virtual void setupFormation (DtFormationModelData *, DtFormation *, const DtString &formationName)
- Protected Member Functions inherited from DtEchelonHierarchy
virtual bool shouldBeAdded (const DtModelKey &key)
 Returs true if the model data referenced by this key should be added to the hierarchy.
virtual DtEchelonHierarchyNodeaddModelNode (const DtModelKey &key)
 Adds a new node to the hierarchy with this key, calls connectNode() to connect the child/parent relationships appropriatly, emits nodeAdded() and returns a pointer to the new node.
virtual void removeModelNode (const DtModelKey &key)
 Removes the node with this key.
virtual void updateModelNode (const DtModelKey &key)
 Updates information about a node that already exists in the tree.
virtual void reconnectNode (DtEchelonHierarchyNode *node)
 Removes all children and reconnects node.
virtual void connectChild (DtEchelonHierarchyNode *parentNode, DtEchelonHierarchyNode *childNode)
 Connects the childNode to the parentNode.
virtual void disconnectNode (DtEchelonHierarchyNode *node)
 Disconnects this node from the rest of the hierarchy.
virtual int calculateLevelsFromNode (DtEchelonHierarchyNode *node)
 Calculates the node level for all nodes below, and including node.
virtual void calculateAllLevels ()
 Calculates the node level for all nodes in the hierarchy.
virtual void sendQueuedNodeReparentedSignals ()
 Sends a nodeReparented() signal for each key in the queue.

Additional Inherited Members

- Public Slots inherited from DtEchelonHierarchy
virtual void addModelData (const DtModelKey &key)
 Checks to see if this model data should be added, and adds if so.
virtual void removeModelData (const DtModelKey &key)
 Removes this model data from the hierarchy if it exists.
virtual void updateModelData (const DtModelKey &key, int changed)
 If key is a current entry in the hierarchy, this function calls updateModelNode().
virtual void reconnectAllNodes ()
 Dissconnects the entire hierarchy, and then calls connectNode() for each node in the hierarchy.
- Signals inherited from DtEchelonHierarchy
void nodeAdded (const DtModelKey &)
 Emitted when a new echelon node is added to the hierarchy.
void nodeAboutToBeRemoved (const DtModelKey &)
 Emitted immediadly before an echelon node is removed from the hierarchy.
void nodeReparented (const DtModelKey &)
 Emitted whenever a node's parent changes.
- Static Public Member Functions inherited from DtEchelonHierarchy
static DtEchelonHierarchycreate (QObject *parent)
 Returns a newly created instance of a DtEchelonHierarchy.
- Protected Slots inherited from DtEchelonHierarchy
virtual void queueNodeReparentedSignal (const DtModelKey &key)
 This queues the key value, for a nodeReparentedSignal.
- Protected Attributes inherited from DtEchelonHierarchy
QHash< DtModelKey,
DtEchelonHierarchyNode * > 
myNodeDict
DtPtrQList
< DtEchelonHierarchyNode * > 
myNodeList
 For looking up by key.
const DtModelDataDictmyModelDataDict
 For searching linerally.
bool myAlwaysReconnectAllNodes
QVector< DtModelKeymyNodeReparentedQueue

Detailed Description

The formation hierarchy is responsible for keeping track of the aggregate organization and formation.

Constructor & Destructor Documentation

DtFormationHierarchy::DtFormationHierarchy ( QObject parent = NULL)

Member Function Documentation

virtual void DtFormationHierarchy::setupFormation ( DtFormation ,
const DtString formationName 
)
virtual

Sets up the model datum to have the correct formation and returns the extent encompassed by the entities.

virtual void DtFormationHierarchy::connectNode ( DtEchelonHierarchyNode node)
protectedvirtual

Connects this node to the rest of the hierarchy.

Default implementation only calls calculateLevelsFromNode().

Reimplemented from DtEchelonHierarchy.

virtual void DtFormationHierarchy::setupFormation ( DtFormationModelData ,
DtFormation ,
const DtString formationName 
)
protectedvirtual

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

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)