VR-Forces 4.0.4 Class Documentation
include/vrvCore/DtChannelManager.h
Go to the documentation of this file.
00001 /****************************************************************************** 
00002 ** Copyright (c) 2010 MAK Technologies, Inc. 
00003 ** All rights reserved. 
00004 ******************************************************************************/ 
00005 /****************************************************************************** 
00006 ** $RCSfile: DtChannelManager.h,v $ $Revision: 1.35 $ $State: Exp $ 
00007 ******************************************************************************/ 
00008  
00012  
00013 #ifndef DtChannelManager_H_ 
00014 #define DtChannelManager_H_ 
00015  
00016 #include <vrvCore/vrvCore.h> 
00017 #include <vrvUtil/DtVirtualBaseClass.h>
00018 #include <vrvUtil/DtWindowConfiguration.h>
00019 #include <boost/signals.hpp>
00020 
00021 #include <map>
00022  
00023 namespace makVrv 
00024 {
00025    class DtDe;
00026    class DtChannel;
00027    class DtChannelConfiguration;
00028    class DtWindow;
00029    class DtAgentManager;
00030    class DtChannelManagerSignaler;
00031 
00035    class DT_DLL_VRVCORE DtChannelManager 
00036    { 
00037 
00038    protected:
00039 
00041       DtChannelManager(DtDe& anIG,DtWindow* window,
00042          DtChannelConfigurations& channelConfigs);
00043 
00044    public:
00045       typedef std::map<std::string,DtChannel*> ChannelMap;
00046      
00048       virtual ~DtChannelManager();
00049 
00054       virtual DtChannel& addChannel(const std::string& displayName, const std::string& windowName, 
00055          const DtChannelConfiguration& wc);
00056 
00058       virtual void destroyChannels();
00059 
00061       virtual void destroyChannel(const std::string& displayName, const std::string& windowName, 
00062          const std::string& channelName);
00063 
00065       virtual bool modifyChannel(const std::string& displayName, const std::string& windowName,
00066          const std::string& oldChannelName, const DtChannelConfiguration& config);
00067 
00069 
00070       DtChannel* findChannelByName(const std::string& name);
00071       const DtChannel* findChannelByName(const std::string& name) const;
00073 
00075       virtual const ChannelMap& channels() const;
00076 
00078       virtual ChannelMap& channels();
00079 
00082       virtual bool tick();
00083 
00085       virtual void realizeChannels();
00086 
00088       virtual void updateAllChannelProjections();
00089 
00090    protected:
00091 
00093       virtual DtChannel* realizeConfiguration(DtChannelConfiguration&);
00094 
00095       DtDe& myDe;
00096       DtChannelManagerSignaler& mySignaler;
00097       DtWindow* myWindow;
00098       DtChannelConfigurations& myChannelConfigurations;
00099       ChannelMap myChannels;
00100    };
00101 
00104    class DT_DLL_VRVCORE DtChannelManagerSignaler : public DtVirtualBaseClass
00105    {
00106    public:
00108       static DtChannelManagerSignaler& instance(DtDe& anIG);
00109 
00111       virtual ~DtChannelManagerSignaler();
00112 
00114       boost::signal<void (DtChannelManager*, DtChannel*)> signal_channelCreated;
00115 
00117       boost::signal<void (DtChannelManager*, DtChannel*)> signal_channelToBeDestroyed;
00118 
00120       boost::signal<void (DtChannelManager*, DtChannel*)> signal_channelUpdated;
00121 
00122    protected:
00123       DtChannelManagerSignaler();
00124 
00125    };
00126 
00127 
00130    class DT_DLL_VRVCORE DtChannelManagerCreator : public DtVirtualBaseClass
00131    {
00132    public:
00134       static DtChannelManagerCreator& instance(DtDe& anIG);
00135 
00137       static void registerInstance(DtDe& anIG,DtChannelManagerCreator* anInstance);     
00138 
00140       virtual DtChannelManager* create(DtDe& anIG,DtWindow* window,
00141          DtChannelConfigurations& channelConfigs) = 0;
00142    };
00143 } 
00144  
00145 #endif 
00146  

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)