diff options
author | Benoit Foucher <benoit@zeroc.com> | 2013-01-17 15:48:26 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2013-01-17 15:48:26 +0100 |
commit | cade94b03f44c09a65542d58746e111a997477c1 (patch) | |
tree | 47c62bd60c8fa62587c271d5e16de711bf973243 /cpp/src/IceGrid/Topics.h | |
parent | Added OS X Frameworks (diff) | |
download | ice-cade94b03f44c09a65542d58746e111a997477c1.tar.bz2 ice-cade94b03f44c09a65542d58746e111a997477c1.tar.xz ice-cade94b03f44c09a65542d58746e111a997477c1.zip |
Fixed ICE-4968 - Support for 1.0 observers with IceGrid
Diffstat (limited to 'cpp/src/IceGrid/Topics.h')
-rw-r--r-- | cpp/src/IceGrid/Topics.h | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/cpp/src/IceGrid/Topics.h b/cpp/src/IceGrid/Topics.h index 7399457d35e..1a27af89ae6 100644 --- a/cpp/src/IceGrid/Topics.h +++ b/cpp/src/IceGrid/Topics.h @@ -43,9 +43,19 @@ protected: void updateSerial(int); Ice::Context getContext(int) const; + template<typename T> std::vector<T> getPublishers() const + { + std::vector<T> publishers; + for(std::vector<Ice::ObjectPrx>::const_iterator p = _basePublishers.begin(); p != _basePublishers.end(); ++p) + { + publishers.push_back(T::uncheckedCast(*p)); + } + return publishers; + } + Ice::LoggerPtr _logger; - IceStorm::TopicPrx _topic; - Ice::ObjectPrx _basePublisher; + std::map<Ice::EncodingVersion, IceStorm::TopicPrx> _topics; + std::vector<Ice::ObjectPrx> _basePublishers; int _serial; std::set<std::string> _syncSubscribers; @@ -67,7 +77,7 @@ public: private: - const RegistryObserverPrx _publisher; + std::vector<RegistryObserverPrx> _publishers; std::map<std::string, RegistryInfo> _registries; }; typedef IceUtil::Handle<RegistryObserverTopic> RegistryObserverTopicPtr; @@ -92,7 +102,7 @@ public: private: const NodeObserverPrx _externalPublisher; - const NodeObserverPrx _publisher; + std::vector<NodeObserverPrx> _publishers; std::map<std::string, NodeDynamicInfo> _nodes; }; typedef IceUtil::Handle<NodeObserverTopic> NodeObserverTopicPtr; @@ -112,7 +122,7 @@ public: private: - const ApplicationObserverPrx _publisher; + std::vector<ApplicationObserverPrx> _publishers; std::map<std::string, ApplicationInfo> _applications; }; typedef IceUtil::Handle<ApplicationObserverTopic> ApplicationObserverTopicPtr; @@ -132,7 +142,7 @@ public: private: - const AdapterObserverPrx _publisher; + std::vector<AdapterObserverPrx> _publishers; std::map<std::string, AdapterInfo> _adapters; }; typedef IceUtil::Handle<AdapterObserverTopic> AdapterObserverTopicPtr; @@ -155,7 +165,7 @@ public: private: - const ObjectObserverPrx _publisher; + std::vector<ObjectObserverPrx> _publishers; std::map<Ice::Identity, ObjectInfo> _objects; }; typedef IceUtil::Handle<ObjectObserverTopic> ObjectObserverTopicPtr; |