VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtAggregateEchelonManager.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2026 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCore/vrvCore.h>
15 #include <vrvCore/DtUniqueID.h>
16 
19 
20 #include <boost/function.hpp>
22 
23 namespace makVrv
24 {
25  class DtDe;
26 }
27 
28 namespace makVrv
29 {
30  class DtBaseConnection;
31 
35  {
36  public:
37  enum Flags
38  {
39  Destroyed = 0x80000000
40  };
41 
42  public:
44  static DtAggregateEchelonManager& instance(DtBaseConnection& connection);
45 
47  static void registerInstance(DtBaseConnection& sim, DtAggregateEchelonManager*);
48 
74  static void processDisplayOperation(DtDe& de, DtElementID id,
76 
97  static void processDirectDisplayOperation(DtDe& de, DtElementID id,
99 
101  static const DtElementIDHierarchyStateAttribute* findHierarchyItem(DtDe& de, DtElementID id);
102 
104  static const DtElementIDHierarchyDisplayStateAttribute* findDisplayState(DtDe& de, DtElementID id);
105 
107  static bool aggregateElementCanBeExpanded(DtDe& de, DtElementID id);
108 
110  static bool aggregateElementCanBeCollapsed(DtDe& de, DtElementID id);
111 
112  virtual ~DtAggregateEchelonManager();
113 
114  protected:
116  virtual void hierarchyItemModified(DtElementIDHierarchyNode*);
117 
119  virtual void hierarchyItemAboutToBeRemoved(DtElementIDHierarchyNode*);
120 
121  public:
122 
124  virtual void setDisplayInitiallyExpanded(bool);
125 
127  virtual void setRecord(const makArchives::DtAggregateSettingsRecord&);
128 
132  virtual void setDestroyed(DtElementID id, bool);
133  bool destroyed(DtElementID) const;
134  boost::signalslib::signal<void(DtElementID, bool b) > signal_aggregateDestroyedStateChanged;
135 
138  void removeElementPendingDestroyedState(DtElementID id);
139 
140  // Get the parent of an element (returns (DtElementID)0 if none).
141  DtElementID parent(DtElementID id);
142 
145  {
146  return myHierarchy;
147  }
148 
150  {
151  return myHierarchy;
152  }
153 
156  virtual const makArchives::DtAggregateSettingsRecord& aggregateSettings() const;
157 
160  boost::signalslib::signal<void(DtElementID, DtElementIDHierarchyNode::DisplayState) > signal_visibilityStateChanged;
161 
163  boost::signalslib::signal<void(DtElementIDHierarchyNode*) > signal_hierarchyItemModified;
164 
166  boost::signalslib::signal<void(DtElementID, const DtElementIDHierarchy::ElementIDs&) > signal_updateHierarchy;
167 
168  protected:
170  void setShowLeafNodes(bool enabled);
173  void setGhostEchelonLevelItems(bool enabled);
174  void setGhostEchelonLevelItemLabels(bool enabled);
175  void setEchelonLevel(int l);
176  void setDisplayAggregates(bool enabled);
178 
179  protected:
180 
182  virtual DtElementIDHierarchyNode::DisplayState expectedDisplayStateFor(const DtElementIDHierarchyNode* node);
183 
185  virtual void updateDestroyedState(DtElementIDHierarchyNode* parentNode);
186 
188  virtual void updateHierarchy(DtElementID parentId, const DtElementIDHierarchy::ElementIDs& children);
189 
190  protected:
192 
193  virtual void slot_echelonVisibilityChanged(DtElementIDHierarchy::VisibilityProcessingList);
194 
195  private:
196  // Emits the signal_elementAttributeChangeRequested for elementToProcess; resolves hierParent from the data bank.
197  static void postDisplayOperation(DtDe& de, DtElementID elementToProcess,
199 
200  protected:
204  std::map<DtElementID, bool> myPendingDestroyedStates;
206  };
207 }
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
std::vector< DtElementID > ElementIDs
Definition: DtElementIDHierarchy.h:115
DtElementIDHierarchy & hierarchy()
Definition: DtAggregateEchelonManager.h:149
std::map< DtElementID, bool > myPendingDestroyedStates
Definition: DtAggregateEchelonManager.h:204
DtElementIDHierarchy myHierarchy
Definition: DtAggregateEchelonManager.h:205
std::set< const DtElementIDHierarchyNode * > VisibilityProcessingList
Definition: DtElementIDHierarchy.h:116
Hierarchy that will keep track of parent/child element id relationships. Will emit signals when the t...
Definition: DtElementIDHierarchy.h:112
DtBaseConnection & myConnection
Definition: DtAggregateEchelonManager.h:202
DtUniqueID DtElementID
The ElementID is a specific type of unique ID used to represent VR-Vantage uniquely defined elements...
Definition: DtUniqueID.h:23
boost::signalslib::signal< void(DtElementID, bool b) > signal_aggregateDestroyedStateChanged
Definition: DtAggregateEchelonManager.h:134
The class that will be used to keep track of echelon hierarchy. (This was moved from vrvVrl 2022) ...
Definition: DtAggregateEchelonManager.h:34
The DtBaseConnection is an abstract class.
Definition: DtBaseConnection.h:35
Contains makVrv::DtVirtualBaseClass class.
DisplayState
Used to keep track of state of item as it should appear visually in the hierarchy.
Definition: DtElementIDHierarchy.h:39
Contains makVrv::DtElementIDHierarchy class. This is an arbitrary hierarchy class that will allow hie...
boost::signalslib::signal< void(DtElementID, const DtElementIDHierarchy::ElementIDs &) > signal_updateHierarchy
Signal raised by updateHierarchy() when the aggregate hierarchy changes.
Definition: DtAggregateEchelonManager.h:166
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
The DtElementIDHierarchyNode class will contain information about an element, its children and its pa...
Definition: DtElementIDHierarchy.h:33
boost::signalslib::signal< void(DtElementIDHierarchyNode *) > signal_hierarchyItemModified
Signal raised when the the DtElementIDHierarchy member indicates a change in a specific heirarchy nod...
Definition: DtAggregateEchelonManager.h:163
DtSignalConnectionManager mySignalConnections
Definition: DtAggregateEchelonManager.h:201
const DtElementIDHierarchy & hierarchy() const
Retrieves the hierarchy.
Definition: DtAggregateEchelonManager.h:144
Base class to provide boost signal/slot management.
Contains makVrv::DtUniqueID type.
Flags
Definition: DtAggregateEchelonManager.h:37
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:76
makArchives::DtAggregateSettingsRecord myAggregateSettings
Definition: DtAggregateEchelonManager.h:203
Record class for aggregate settings.
Definition: DtAggregateSettingsRecord.h:19
Definition: DtUniqueElementAttribute.h:81
DisplayState
Definition: DtElementIDHierarchyState.h:69
boost::signalslib::signal< void(DtElementID, DtElementIDHierarchyNode::DisplayState) > signal_visibilityStateChanged
Signal raised when the DtElementIDHierarchy member indicates a change in visibility for an element...
Definition: DtAggregateEchelonManager.h:160
Contains the DtAggregateSettingsRecord class declaration.
Contains DLL export macros.

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)