1#ifndef adc_publisher_ipp
2#define adc_publisher_ipp
4#ifdef ADC_DEBUG_MULTI_PUBLISHER
5#define multi_publisher_debug 1
7#define multi_publisher_debug 0
22 const std::vector<string> tags;
35 void add(std::shared_ptr<publisher_api> p) {
39 int publish(std::shared_ptr<builder_api> b)
44 for (
auto& element : pvec) {
45 int e = element->publish(b);
49 std::cout <<
"publish failed for plugin "
50 << element->name() << std::endl;
58 for (
auto& element : pvec) {
66 for (
auto& element : pvec) {
73 for (
auto& element : pvec) {
Interface for a group of publishers all being fed the same message(s).
void pause()
Pause all publishers.
string_view version() const
Get the version.
void add(std::shared_ptr< publisher_api > p)
Add a configured and initialized publisher.
void resume()
Resume all publishers.
void terminate()
Finalize all added publishers.
int publish(std::shared_ptr< builder_api > b)
Publish the same message to all added publishers.
std::vector< std::shared_ptr< publisher_api > > publisher_vector
list of publishers
#define multi_publisher_debug
std::string_view string_view