Merge pull request #4844 from jrw972/gh-actions-flag-cleanup
[OpenDDS.git] / performance-tests / bench / builder / SubscriberManager.cpp
blobd614da96d17603377a9ef2b5e9060e62a849a593
1 #include "SubscriberManager.h"
3 namespace Builder {
5 SubscriberManager::SubscriberManager(const SubscriberConfigSeq& configs, SubscriberReportSeq& reports, DDS::DomainParticipant_var& participant,
6 const std::shared_ptr<TopicManager>& topics, ReaderMap& reader_map, const ContentFilteredTopicMap& cft_map)
8 reports.length(configs.length());
9 for (CORBA::ULong i = 0; i < configs.length(); ++i) {
10 subscribers_.emplace_back(std::make_shared<Subscriber>(configs[i], reports[i], participant, topics, reader_map, cft_map));
14 bool SubscriberManager::enable(bool throw_on_error)
16 bool result = true;
17 for (auto it = subscribers_.begin(); it != subscribers_.end(); ++it) {
18 result &= (*it)->enable(throw_on_error);
20 return result;
23 void SubscriberManager::detach_listeners()
25 for (auto it = subscribers_.begin(); it != subscribers_.end(); ++it) {
26 (*it)->detach_listeners();