VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtChannelManager.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2022 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #ifndef DtChannelManager_H_
11 #define DtChannelManager_H_
12 
13 #include <vrvCore/vrvCore.h>
16 #include <vrvUtil/signalslib.h>
17 
18 #include <map>
19 
20 namespace makVrv
21 {
22  class DtDe;
23  class DtChannel;
24  class DtChannelConfiguration;
25  class DtWindow;
26  class DtAgentManager;
27  class DtChannelManagerSignaler;
28 
33  {
34 
35  protected:
36 
38  DtChannelManager(DtDe& anIG,DtWindow* window,
39  DtChannelConfigurations& channelConfigs);
40 
41  public:
42  typedef std::map<std::string,DtChannel*> ChannelMap;
43 
45  virtual ~DtChannelManager();
46 
51  virtual DtChannel& addChannel(const std::string& displayName, const std::string& windowName,
52  const DtChannelConfiguration& wc);
53 
55  virtual void destroyChannels();
56 
58  virtual void destroyChannel(const std::string& displayName, const std::string& windowName,
59  const std::string& channelName);
60 
62  virtual bool modifyChannel(const std::string& displayName, const std::string& windowName,
63  const std::string& oldChannelName, const DtChannelConfiguration& config);
64 
66  DtChannel* findChannelByName(const std::string& name);
68  const DtChannel* findChannelByName(const std::string& name) const;
70 
72  virtual const ChannelMap& channels() const;
73 
75  virtual ChannelMap& channels();
76 
79  virtual bool tick();
80 
82  virtual void realizeChannels( const std::string& windowName );
83 
85  virtual void updateAllChannelProjections();
86  protected:
87 
89  virtual DtChannel* realizeConfiguration(DtChannelConfiguration&);
90 
96  };
97 
101  {
102  public:
104  static DtChannelManagerSignaler& instance(DtDe& anIG);
105 
107  virtual ~DtChannelManagerSignaler();
108 
110  boost::signalslib::signal<void (DtChannelManager*, DtChannel*)> signal_channelCreated;
111 
113  boost::signalslib::signal<void (DtChannelManager*, DtChannel*)> signal_channelToBeDestroyed;
114 
116  boost::signalslib::signal<void (DtChannelManager*, DtChannel*)> signal_channelUpdated;
117 
118  protected:
120 
121  };
122 
123 
127  {
128  public:
130  static DtChannelManagerCreator& instance(DtDe& anIG);
131 
133  static void registerInstance(DtDe& anIG,DtChannelManagerCreator* anInstance);
134 
136  virtual DtChannelManager* create(DtDe& anIG,DtWindow* window,
137  DtChannelConfigurations& channelConfigs) = 0;
138  };
139 }
140 
141 #endif
142 
DtWindow * myWindow
Definition: DtChannelManager.h:93
Abstract Base class.
Definition: DtWindow.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
DtDe & myDe
Definition: DtChannelManager.h:91
boost::signalslib::signal< void(DtChannelManager *, DtChannel *)> signal_channelUpdated
Signals when a channel is updated.
Definition: DtChannelManager.h:116
boost::signalslib::signal< void(DtChannelManager *, DtChannel *)> signal_channelToBeDestroyed
Signals when a channel is about to be destroyed.
Definition: DtChannelManager.h:113
Creator for a DtChannelManager.
Definition: DtChannelManager.h:126
ChannelMap myChannels
Definition: DtChannelManager.h:95
A class which contains the signals used by the channel manager classes.
Definition: DtChannelManager.h:100
The abstract Channel Class.
Definition: DtChannel.h:35
boost::signalslib::signal< void(DtChannelManager *, DtChannel *)> signal_channelCreated
Signals when a new channel is created.
Definition: DtChannelManager.h:110
Contains makVrv::DtVirtualBaseClass class.
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
DtChannelConfigurations & myChannelConfigurations
Definition: DtChannelManager.h:94
Base class for handling DtChannels. Derived classes should override the tick() method and advance the...
Definition: DtChannelManager.h:32
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:72
DtChannelManagerSignaler & mySignaler
Definition: DtChannelManager.h:92
Contains makVrv::DtWindowConfiguration class.
std::map< std::string, DtChannel * > ChannelMap
Definition: DtChannelManager.h:42
Contains DLL export macros.

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)