VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtChannelKeywordObjectManager.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2023 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCore/vrvCore.h>
13 
16 
17 #include <unordered_map>
18 #include <string>
19 #include <vector>
20 
21 namespace makVrv
22 {
23  class DtAgentManagerInterface;
24  class DtChannel;
25  class DtChannelKeywordObject;
26  class DtChannelConfiguration;
27  class DtWindowConfiguration;
28  class DtChannelManager;
29  class DtDe;
30  class DtWindowConfiguration;
31 
35  {
36 
37  public:
40  using ObjectMap = std::unordered_map<std::string, DtChannelKeywordObject*> ;
41 
43  using ChannelMap = std::unordered_map<std::string, ObjectMap> ;
44 
45 
46  public:
49 
52 
55  static DtChannelKeywordObjectManager& instance( DtDe& de );
56 
58  const ChannelMap& channelMap() const;
59 
60  protected:
61 
64  virtual void slot_channelCreated( DtChannelManager*, DtChannel* );
65 
66  virtual void slot_channelToBeDestroyed( const std::string& deName,
67  const std::string& winName, const std::string& channelName );
68 
69  virtual void slot_channelConfigurationAdded( const std::string& deName,
70  const std::string& winName, const DtChannelConfiguration& config);
71 
72  virtual void slot_displayConfigurationRealized( const std::string& igName,
73  const std::string& displayName );
74 
75  virtual void slot_displayToBeDestroyed( const std::string& displayName );
76 
77  virtual void slot_channelConfigurationModified( const std::string& deName,
78  const std::string& winName, const std::string& oldChannelName,
79  const DtChannelConfiguration& config);
80 
81  virtual void slot_windowConfigurationModified( const std::string& deName,
82  const std::string& oldWindowName, const DtWindowConfiguration& config);
84 
88  virtual void processChannelConfiguration(const std::string& deName,
89  const std::string& winName, const DtChannelConfiguration& config );
90 
91  virtual std::string makeChannelKey( const std::string& deName,
92  const std::string& winName, const std::string& channelName );
93 
94  virtual std::string makeWindowKey( const std::string& deName,
95  const std::string& winName );
96 
97  virtual void addChannelKeywordObject( const std::string& channelKey,
98  const std::string& keyword, DtChannelKeywordObject* keywordObject );
99 
100  virtual void removeChannelKeywordObject( const std::string& channelKey,
101  const std::string& keyword );
102 
105  virtual void removeAllChannelKeywordObjectsFromChannel( const std::string& channelKey );
106 
107  void addToWindowMap( const std::string& windowKey, const std::string& channelKey );
108 
109  void removeFromWindowMap( const std::string& windowKey, const std::string& channelKey );
110 
111  static std::string getChannelNameFromChannelKey( const std::string& channelKey );
112 
113  protected:
117  protected:
118 
122  using ChannelKeyList = std::vector<std::string> ;
123  using WindowMap = std::unordered_map<std::string, ChannelKeyList>;
124 
127 
132 
134  };
135 
139  {
140 
141  public:
143  static DtChannelKeywordObjectManagerCreator& instance( DtDe& );
144 
146  static void registerInstance( DtDe& theIG, DtChannelKeywordObjectManagerCreator* anInstance );
147 
149  virtual DtChannelKeywordObjectManager* create( DtDe& );
150  };
151 }
152 
An object that manages 2D Channel-specific keyword-specified objects.
Definition: DtChannelKeywordObjectManager.h:34
The base class for all channel keyword objects.
Definition: DtChannelKeywordObject.h:25
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
ChannelMap myChannelMap
This map provides a pointer to CompassMap given a ChannelName :: WindowName :: DisplayName string...
Definition: DtChannelKeywordObjectManager.h:131
DtSignalConnectionManager myConnections
Definition: DtChannelKeywordObjectManager.h:126
std::vector< std::string > ChannelKeyList
This is a map of channel key lists indexed by window key Given a deName/windowName, we can get all the channel keys for channels in that window that have compasses.
Definition: DtChannelKeywordObjectManager.h:122
This owns a list of channel configurations.
Definition: DtWindowConfiguration.h:26
std::unordered_map< std::string, ChannelKeyList > WindowMap
Definition: DtChannelKeywordObjectManager.h:123
WindowMap myWindowMap
Definition: DtChannelKeywordObjectManager.h:133
The abstract Channel Class.
Definition: DtChannel.h:35
Contains makVrv::DtVirtualBaseClass class.
std::unordered_map< std::string, DtChannelKeywordObject * > ObjectMap
This is a map of channel keyword objects indexed by keyword name. each channel may have such a map...
Definition: DtChannelKeywordObjectManager.h:40
DtDe & myDe
Definition: DtChannelKeywordObjectManager.h:125
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
Compass Manager creator.
Definition: DtChannelKeywordObjectManager.h:138
Base class for handling DtChannels. Derived classes should override the tick() method and advance the...
Definition: DtChannelManager.h:32
Base class to provide boost signal/slot management.
Configuration for a single channel Serialized and sent to remote displays as necessary to configure r...
Definition: DtChannelConfiguration.h:24
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
std::unordered_map< std::string, ObjectMap > ChannelMap
This is a map of ObjectMaps, indexed by ChannelName :: WindowName :: DisplayName. ...
Definition: DtChannelKeywordObjectManager.h:43
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)