1 #include "PublisherManager.h"
5 PublisherManager::PublisherManager(const PublisherConfigSeq
& configs
, PublisherReportSeq
& reports
,
6 DDS::DomainParticipant_var
& participant
, const std::shared_ptr
<TopicManager
>& topics
, WriterMap
& writer_map
)
8 reports
.length(configs
.length());
9 for (CORBA::ULong i
= 0; i
< configs
.length(); ++i
) {
10 publishers_
.emplace_back(std::make_shared
<Publisher
>(configs
[i
], reports
[i
], participant
, topics
, writer_map
));
14 bool PublisherManager::enable(bool throw_on_error
)
17 for (auto it
= publishers_
.begin(); it
!= publishers_
.end(); ++it
) {
18 result
&= (*it
)->enable(throw_on_error
);
23 void PublisherManager::detach_listeners()
25 for (auto it
= publishers_
.begin(); it
!= publishers_
.end(); ++it
) {
26 (*it
)->detach_listeners();