VR-Forces 5.0.1 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>
14 
17 
18 #include <boost/function.hpp>
20 
21 namespace makVrv
22 {
23  class DtDe;
24 }
25 
26 namespace makVrv
27 {
28  class DtBaseConnection;
29 
33  {
34  public:
35  enum Flags
36  {
37  Destroyed = 0x80000000
38  };
39 
40  public:
42  static DtAggregateEchelonManager& instance(DtBaseConnection& connection);
43 
45  static void registerInstance(DtBaseConnection& sim, DtAggregateEchelonManager*);
46 
47  virtual ~DtAggregateEchelonManager();
48 
49  protected:
51  virtual void hierarchyItemModified(DtElementIDHierarchyNode*);
52 
54  virtual void hierarchyItemAboutToBeRemoved(DtElementIDHierarchyNode*);
55 
56  public:
57 
59  virtual void setDisplayInitiallyExpanded(bool);
60 
62  virtual void setRecord(const makArchives::DtAggregateSettingsRecord&);
63 
67  virtual void setDestroyed(DtElementID id, bool);
68  bool destroyed(DtElementID) const;
69  boost::signalslib::signal<void(DtElementID, bool b) > signal_aggregateDestroyedStateChanged;
70 
73  void removeElementPendingDestroyedState(DtElementID id);
74 
77  {
78  return myHierarchy;
79  }
80 
82  {
83  return myHierarchy;
84  }
85 
88  virtual const makArchives::DtAggregateSettingsRecord& aggregateSettings() const;
89 
92  boost::signalslib::signal<void(DtElementID, DtElementIDHierarchyNode::DisplayState) > signal_visibilityStateChanged;
93 
95  boost::signalslib::signal<void(DtElementIDHierarchyNode*) > signal_hierarchyItemModified;
96 
97  protected:
99  void setShowLeafNodes(bool enabled);
102  void setGhostEchelonLevelItems(bool enabled);
103  void setGhostEchelonLevelItemLabels(bool enabled);
104  void setEchelonLevel(int l);
105  void setDisplayAggregates(bool enabled);
107 
108  protected:
109 
111  virtual DtElementIDHierarchyNode::DisplayState expectedDisplayStateFor(const DtElementIDHierarchyNode* node);
112 
114  virtual void updateDestroyedState(DtElementIDHierarchyNode* parentNode);
115 
117  virtual void updateHierarchy(DtElementID parentId, const DtElementIDHierarchy::ElementIDs& children);
118 
119  protected:
121 
122  virtual void slot_echelonVisibilityChanged(DtElementIDHierarchy::VisibilityProcessingList);
123 
124  protected:
128  std::map<DtElementID, bool> myPendingDestroyedStates;
130  };
131 }
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:81
std::map< DtElementID, bool > myPendingDestroyedStates
Definition: DtAggregateEchelonManager.h:128
DtElementIDHierarchy myHierarchy
Definition: DtAggregateEchelonManager.h:129
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:126
boost::signalslib::signal< void(DtElementID, bool b) > signal_aggregateDestroyedStateChanged
Definition: DtAggregateEchelonManager.h:69
The class that will be used to keep track of echelon hierarchy. (This was moved from vrvVrl 2022) ...
Definition: DtAggregateEchelonManager.h:32
The DtBaseConnection is an abstract class.
Definition: DtBaseConnection.h:39
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...
#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:95
DtSignalConnectionManager mySignalConnections
Definition: DtAggregateEchelonManager.h:125
const DtElementIDHierarchy & hierarchy() const
Retrieves the hierarchy.
Definition: DtAggregateEchelonManager.h:76
Base class to provide boost signal/slot management.
Flags
Definition: DtAggregateEchelonManager.h:35
makArchives::DtAggregateSettingsRecord myAggregateSettings
Definition: DtAggregateEchelonManager.h:127
Record class for aggregate settings.
Definition: DtAggregateSettingsRecord.h:19
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:92
Contains the DtAggregateSettingsRecord class declaration.
Contains DLL export macros.

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)