1 #include "SubscriberManager.h"
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
)
17 for (auto it
= subscribers_
.begin(); it
!= subscribers_
.end(); ++it
) {
18 result
&= (*it
)->enable(throw_on_error
);
23 void SubscriberManager::detach_listeners()
25 for (auto it
= subscribers_
.begin(); it
!= subscribers_
.end(); ++it
) {
26 (*it
)->detach_listeners();