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) 2022 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 
50  static void processDisplayOperation(DtDe& de, DtElementID id, DtElementIDHierarchyDisplayState::DisplayState operation);
51 
53  static const DtElementIDHierarchyStateAttribute* findHierarchyItem(DtDe& de, DtElementID id);
54 
56  static const DtElementIDHierarchyDisplayStateAttribute* findDisplayState(DtDe& de, DtElementID id);
57 
59  static bool aggregateElementCanBeExpanded(DtDe& de, DtElementID id);
60 
62  static bool aggregateElementCanBeCollapsed(DtDe& de, DtElementID id);
63 
64  virtual ~DtAggregateEchelonManager();
65 
66  protected:
68  virtual void hierarchyItemModified(DtElementIDHierarchyNode*);
69 
71  virtual void hierarchyItemAboutToBeRemoved(DtElementIDHierarchyNode*);
72 
73  public:
74 
76  virtual void setDisplayInitiallyExpanded(bool);
77 
79  virtual void setRecord(const makArchives::DtAggregateSettingsRecord&);
80 
84  virtual void setDestroyed(DtElementID id, bool);
85  bool destroyed(DtElementID) const;
86  boost::signalslib::signal<void(DtElementID, bool b) > signal_aggregateDestroyedStateChanged;
87 
90  void removeElementPendingDestroyedState(DtElementID id);
91 
92  // Get the parent of an element (returns (DtElementID)0 if none).
93  DtElementID parent(DtElementID id);
94 
97  {
98  return myHierarchy;
99  }
100 
102  {
103  return myHierarchy;
104  }
105 
108  virtual const makArchives::DtAggregateSettingsRecord& aggregateSettings() const;
109 
112  boost::signalslib::signal<void(DtElementID, DtElementIDHierarchyNode::DisplayState) > signal_visibilityStateChanged;
113 
115  boost::signalslib::signal<void(DtElementIDHierarchyNode*) > signal_hierarchyItemModified;
116 
118  boost::signalslib::signal<void(DtElementID, const DtElementIDHierarchy::ElementIDs&) > signal_updateHierarchy;
119 
120  protected:
122  void setShowLeafNodes(bool enabled);
125  void setGhostEchelonLevelItems(bool enabled);
126  void setGhostEchelonLevelItemLabels(bool enabled);
127  void setEchelonLevel(int l);
128  void setDisplayAggregates(bool enabled);
130 
131  protected:
132 
134  virtual DtElementIDHierarchyNode::DisplayState expectedDisplayStateFor(const DtElementIDHierarchyNode* node);
135 
137  virtual void updateDestroyedState(DtElementIDHierarchyNode* parentNode);
138 
140  virtual void updateHierarchy(DtElementID parentId, const DtElementIDHierarchy::ElementIDs& children);
141 
142  protected:
144 
145  virtual void slot_echelonVisibilityChanged(DtElementIDHierarchy::VisibilityProcessingList);
146 
147  protected:
151  std::map<DtElementID, bool> myPendingDestroyedStates;
153  };
154 }
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:114
DtElementIDHierarchy & hierarchy()
Definition: DtAggregateEchelonManager.h:101
std::map< DtElementID, bool > myPendingDestroyedStates
Definition: DtAggregateEchelonManager.h:151
DtElementIDHierarchy myHierarchy
Definition: DtAggregateEchelonManager.h:152
std::set< const DtElementIDHierarchyNode * > VisibilityProcessingList
Definition: DtElementIDHierarchy.h:115
Hierarchy that will keep track of parent/child element id relationships. Will emit signals when the t...
Definition: DtElementIDHierarchy.h:111
DtBaseConnection & myConnection
Definition: DtAggregateEchelonManager.h:149
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:86
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:118
#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:115
DtSignalConnectionManager mySignalConnections
Definition: DtAggregateEchelonManager.h:148
const DtElementIDHierarchy & hierarchy() const
Retrieves the hierarchy.
Definition: DtAggregateEchelonManager.h:96
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:150
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:112
Contains the DtAggregateSettingsRecord class declaration.
Contains DLL export macros.

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)