VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Private Member Functions
makVrv::DtAggregateEchelonManager Class Reference

The class that will be used to keep track of echelon hierarchy. (This was moved from vrvVrl 2022)

Inheritance diagram for makVrv::DtAggregateEchelonManager:
Inheritance graph
[legend]

Public Types

enum  Flags { Destroyed = 0x80000000 }
 

Public Member Functions

virtual ~DtAggregateEchelonManager ()
 
virtual void setDisplayInitiallyExpanded (bool)
 
virtual void setRecord (const makArchives::DtAggregateSettingsRecord &)
 
virtual void setDestroyed (DtElementID id, bool)
 
bool destroyed (DtElementID) const
 
void removeElementPendingDestroyedState (DtElementID id)
 
DtElementID parent (DtElementID id)
 
const DtElementIDHierarchy & hierarchy () const
 
DtElementIDHierarchy & hierarchy ()
 
virtual const
makArchives::DtAggregateSettingsRecord & 
aggregateSettings () const
 
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 
virtual ~DtVirtualBaseClass ()
 

Static Public Member Functions

static DtAggregateEchelonManager & instance (DtBaseConnection &connection)
 
static void registerInstance (DtBaseConnection &sim, DtAggregateEchelonManager *)
 
static void processDisplayOperation (DtDe &de, DtElementID id, DtElementIDHierarchyDisplayState::DisplayState operation)
 
static void processDirectDisplayOperation (DtDe &de, DtElementID id, DtElementIDHierarchyDisplayState::DisplayState operation)
 
static const
DtElementIDHierarchyStateAttribute * 
findHierarchyItem (DtDe &de, DtElementID id)
 
static const
DtElementIDHierarchyDisplayStateAttribute * 
findDisplayState (DtDe &de, DtElementID id)
 
static bool aggregateElementCanBeExpanded (DtDe &de, DtElementID id)
 
static bool aggregateElementCanBeCollapsed (DtDe &de, DtElementID id)
 

Public Attributes

boost::signalslib::signal
< void(DtElementID, bool b) > 
signal_aggregateDestroyedStateChanged
 
boost::signalslib::signal
< void(DtElementID,
DtElementIDHierarchyNode::DisplayState) > 
signal_visibilityStateChanged
 
boost::signalslib::signal
< void(DtElementIDHierarchyNode *) > 
signal_hierarchyItemModified
 
boost::signalslib::signal
< void(DtElementID, const
DtElementIDHierarchy::ElementIDs &) > 
signal_updateHierarchy
 

Protected Member Functions

virtual void hierarchyItemModified (DtElementIDHierarchyNode *)
 
virtual void hierarchyItemAboutToBeRemoved (DtElementIDHierarchyNode *)
 
virtual
DtElementIDHierarchyNode::DisplayState 
expectedDisplayStateFor (const DtElementIDHierarchyNode *node)
 
virtual void updateDestroyedState (DtElementIDHierarchyNode *parentNode)
 
virtual void updateHierarchy (DtElementID parentId, const DtElementIDHierarchy::ElementIDs &children)
 
 DtAggregateEchelonManager (DtBaseConnection &sim)
 
virtual void slot_echelonVisibilityChanged (DtElementIDHierarchy::VisibilityProcessingList)
 
void setShowLeafNodes (bool enabled)
 
void setGhostEchelonLevelItems (bool enabled)
 
void setGhostEchelonLevelItemLabels (bool enabled)
 
void setEchelonLevel (int l)
 
void setDisplayAggregates (bool enabled)
 

Protected Attributes

DtSignalConnectionManager mySignalConnections
 
DtBaseConnection & myConnection
 
makArchives::DtAggregateSettingsRecord myAggregateSettings
 
std::map< DtElementID, bool > myPendingDestroyedStates
 
DtElementIDHierarchy myHierarchy
 

Static Private Member Functions

static void postDisplayOperation (DtDe &de, DtElementID elementToProcess, DtElementIDHierarchyDisplayState::DisplayState operation)
 

Member Enumeration Documentation

Enumerator
Destroyed 

Constructor & Destructor Documentation

virtual makVrv::DtAggregateEchelonManager::~DtAggregateEchelonManager ( )
virtual
makVrv::DtAggregateEchelonManager::DtAggregateEchelonManager ( DtBaseConnection &  sim)
protected

Member Function Documentation

static DtAggregateEchelonManager& makVrv::DtAggregateEchelonManager::instance ( DtBaseConnection &  connection)
static

Get the global instance.

static void makVrv::DtAggregateEchelonManager::registerInstance ( DtBaseConnection &  sim,
DtAggregateEchelonManager *   
)
static

Register the global instance.

static void makVrv::DtAggregateEchelonManager::processDisplayOperation ( DtDe &  de,
DtElementID  id,
DtElementIDHierarchyDisplayState::DisplayState  operation 
)
static

Apply a display-state operation to an aggregate with user interaction redirect semantics (VRV-6733).

This is the GUI-facing entry point for collapse/expand operations. Its redirect rules mirror what a user expects when selecting an item and pressing Collapse/Expand:

  • Collapse or CollapseAll: when id has a hierarchy parent the operation is redirected to that parent. This lets a user select a subordinate element and collapse it into its superior without having to first navigate to the superior.
  • Expand or ExpandAll: when id is a childless leaf node the operation is redirected to its parent for the same ergonomic reason.
Warning
Routing programmatic (auto-collapse) collapses through this method causes over-collapse: programmatic callers that have already selected the exact target aggregate will collapse one tier too high. On a shallow branch whose top aggregate is attached directly under the root this collapses the entire hierarchy. This was the root cause of the auto-collapse-expand bug where every level was always collapsed. Use processDirectDisplayOperation() instead for programmatic callers.
Note
Use this variant when the operation originates from a direct user interaction, such as an object list context menu selection or a toolbar button press.
If id is not found in the data bank the call is a no-op.
Parameters
deThe simulation data environment.
idThe element whose display state should change (may be redirected; see above).
operationThe desired display-state transition.
See Also
processDirectDisplayOperation()
static void makVrv::DtAggregateEchelonManager::processDirectDisplayOperation ( DtDe &  de,
DtElementID  id,
DtElementIDHierarchyDisplayState::DisplayState  operation 
)
static

Apply a display-state operation to exactly the named aggregate with no parent redirection.

This entry point is intended for programmatic callers (e.g. DtAutoCollapseExpandEchelonManager) that have already selected the precise target aggregate through their own tree-walk logic and must not have the operation silently redirected to a parent. Unlike processDisplayOperation(), no useParent logic is applied: the operation is posted for id itself regardless of its position in the hierarchy. All four DisplayState values (Expand, ExpandAll, Collapse, CollapseAll) are applied directly to id with no hierarchy-parent substitution.

If id does not exist in the data bank the method does nothing (same silent behavior as processDisplayOperation()).

Note
Use this variant when the caller has already determined the exact aggregate target through its own traversal logic, such as DtAutoCollapseExpandEchelonManager.
Parameters
deThe simulation data environment.
idThe element to which the operation is applied exactly as given.
operationThe desired display-state transition.
See Also
processDisplayOperation()
static const DtElementIDHierarchyStateAttribute* makVrv::DtAggregateEchelonManager::findHierarchyItem ( DtDe &  de,
DtElementID  id 
)
static

Utility function to retrieve the DtElementIDHierarchyStateAttribute of an aggregate.

static const DtElementIDHierarchyDisplayStateAttribute* makVrv::DtAggregateEchelonManager::findDisplayState ( DtDe &  de,
DtElementID  id 
)
static

Utility function to retrieve the ElementIDHierarchyDisplayStateAttribute of an aggregate.

static bool makVrv::DtAggregateEchelonManager::aggregateElementCanBeExpanded ( DtDe &  de,
DtElementID  id 
)
static

Utility function to determine whether an aggregate can be expanded or not.

static bool makVrv::DtAggregateEchelonManager::aggregateElementCanBeCollapsed ( DtDe &  de,
DtElementID  id 
)
static

Utility function to determine whether an aggregate can be collapsed or not.

virtual void makVrv::DtAggregateEchelonManager::hierarchyItemModified ( DtElementIDHierarchyNode *  )
protectedvirtual

Called when a hierarchy item is modified. Uses echelon signaler to emit signal that an item was modified.

virtual void makVrv::DtAggregateEchelonManager::hierarchyItemAboutToBeRemoved ( DtElementIDHierarchyNode *  )
protectedvirtual

Called when a hierarchy item is about to be removed.

virtual void makVrv::DtAggregateEchelonManager::setDisplayInitiallyExpanded ( bool  )
virtual

Sets, into the hierarchy, to display initially expanded (or not)

virtual void makVrv::DtAggregateEchelonManager::setRecord ( const makArchives::DtAggregateSettingsRecord &  )
virtual

Called when aggregate settings have changed, redo settings for appropriate observer mode.

virtual void makVrv::DtAggregateEchelonManager::setDestroyed ( DtElementID  id,
bool   
)
virtual

Sets whether or not something is destroyed. Since aggregates do not publish their destroyed states, this will keep track of that, and signal when aggregate destroyed states changes based on their subordinates.

bool makVrv::DtAggregateEchelonManager::destroyed ( DtElementID  ) const
void makVrv::DtAggregateEchelonManager::removeElementPendingDestroyedState ( DtElementID  id)

Individual entities also add destroyed state info, which they need to remove when they are destroyed.

DtElementID makVrv::DtAggregateEchelonManager::parent ( DtElementID  id)
const DtElementIDHierarchy& makVrv::DtAggregateEchelonManager::hierarchy ( ) const
inline

Retrieves the hierarchy.

DtElementIDHierarchy& makVrv::DtAggregateEchelonManager::hierarchy ( )
inline
virtual const makArchives::DtAggregateSettingsRecord& makVrv::DtAggregateEchelonManager::aggregateSettings ( ) const
virtual

Access the aggregate settings record. This is a copy of the record based on signals provided by the DtSharedAggregateDisplaySettingsSignaler.

void makVrv::DtAggregateEchelonManager::setShowLeafNodes ( bool  enabled)
protected

These methods are called when signals are raised by the DtSharedAggregateDisplaySettingsSignaler that need to be passed down to the DtElementIDHierarchy member.

void makVrv::DtAggregateEchelonManager::setGhostEchelonLevelItems ( bool  enabled)
protected

These methods are called when signals are raised by the DtSharedAggregateDisplaySettingsSignaler that need to be passed down to the DtElementIDHierarchy member.

void makVrv::DtAggregateEchelonManager::setGhostEchelonLevelItemLabels ( bool  enabled)
protected

These methods are called when signals are raised by the DtSharedAggregateDisplaySettingsSignaler that need to be passed down to the DtElementIDHierarchy member.

void makVrv::DtAggregateEchelonManager::setEchelonLevel ( int  l)
protected

These methods are called when signals are raised by the DtSharedAggregateDisplaySettingsSignaler that need to be passed down to the DtElementIDHierarchy member.

void makVrv::DtAggregateEchelonManager::setDisplayAggregates ( bool  enabled)
protected

These methods are called when signals are raised by the DtSharedAggregateDisplaySettingsSignaler that need to be passed down to the DtElementIDHierarchy member.

virtual DtElementIDHierarchyNode::DisplayState makVrv::DtAggregateEchelonManager::expectedDisplayStateFor ( const DtElementIDHierarchyNode *  node)
protectedvirtual

Will return either hidden or ghosted.

virtual void makVrv::DtAggregateEchelonManager::updateDestroyedState ( DtElementIDHierarchyNode *  parentNode)
protectedvirtual

Will process the parent for the new subordinate destroyed state (and any other parent that might be effected)

virtual void makVrv::DtAggregateEchelonManager::updateHierarchy ( DtElementID  parentId,
const DtElementIDHierarchy::ElementIDs &  children 
)
protectedvirtual

Override to see if the destroyed state of an item that has children should be updated.

virtual void makVrv::DtAggregateEchelonManager::slot_echelonVisibilityChanged ( DtElementIDHierarchy::VisibilityProcessingList  )
protectedvirtual
static void makVrv::DtAggregateEchelonManager::postDisplayOperation ( DtDe &  de,
DtElementID  elementToProcess,
DtElementIDHierarchyDisplayState::DisplayState  operation 
)
staticprivate

Member Data Documentation

boost::signalslib::signal<void(DtElementID, bool b) > makVrv::DtAggregateEchelonManager::signal_aggregateDestroyedStateChanged
boost::signalslib::signal<void(DtElementID, DtElementIDHierarchyNode::DisplayState) > makVrv::DtAggregateEchelonManager::signal_visibilityStateChanged

Signal raised when the DtElementIDHierarchy member indicates a change in visibility for an element. This is typically caused by collapsing or expanding aggregates.

boost::signalslib::signal<void(DtElementIDHierarchyNode*) > makVrv::DtAggregateEchelonManager::signal_hierarchyItemModified

Signal raised when the the DtElementIDHierarchy member indicates a change in a specific heirarchy node.

boost::signalslib::signal<void(DtElementID, const DtElementIDHierarchy::ElementIDs&) > makVrv::DtAggregateEchelonManager::signal_updateHierarchy

Signal raised by updateHierarchy() when the aggregate hierarchy changes.

DtSignalConnectionManager makVrv::DtAggregateEchelonManager::mySignalConnections
protected
DtBaseConnection& makVrv::DtAggregateEchelonManager::myConnection
protected
makArchives::DtAggregateSettingsRecord makVrv::DtAggregateEchelonManager::myAggregateSettings
protected
std::map<DtElementID, bool> makVrv::DtAggregateEchelonManager::myPendingDestroyedStates
protected
DtElementIDHierarchy makVrv::DtAggregateEchelonManager::myHierarchy
protected

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

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)