libadc-cxx 1.0.0
Structured logging for scientific computing
Loading...
Searching...
No Matches
multi_publisher.hpp
Go to the documentation of this file.
1#ifndef adc_multi_publisher_hpp
2#define adc_multi_publisher_hpp
3#include <string>
4#include <iostream>
5#include <sstream>
6#include <map>
7#include <memory>
8#include "adc/types.hpp"
11#define MULTI_PUBLISHER_VERSION "0.0.0"
12#define MULTI_PUBLISHER_TAGS {"none"}
13
14namespace adc {
15
16
17/** \addtogroup API
18 * @{
19 */
20
22
23/*! \brief Interface for a group of publishers all being fed the same message(s).
24
25 */
26class ADC_VISIBLE multi_publisher_api
27{
28public:
29 /// \brief Get the version.
30 virtual std::string_view version() const = 0;
31
32 /// \brief Add a configured and initialized publisher
33 virtual void add(std::shared_ptr<publisher_api> pub) = 0;
34
35 /// \brief Finalize all added publishers
36 virtual void terminate() = 0;
37
38 /// \brief Publish the same message to all added publishers.
39 virtual int publish(std::shared_ptr<builder_api> b) = 0;
40
41 /// \brief Pause all publishers
42 virtual void pause() = 0;
43
44 /// \brief Resume all publishers
45 virtual void resume() = 0;
46
47
49};
50
51/** @}*/
52
53} // namespace adc
54#endif // adc_publisher_hpp
Interface for a group of publishers all being fed the same message(s).
virtual void resume()=0
Resume all publishers.
virtual void terminate()=0
Finalize all added publishers.
virtual void add(std::shared_ptr< publisher_api > pub)=0
Add a configured and initialized publisher.
virtual void pause()=0
Pause all publishers.
virtual std::string_view version() const =0
Get the version.
virtual int publish(std::shared_ptr< builder_api > b)=0
Publish the same message to all added publishers.
version multi_publisher_version(MULTI_PUBLISHER_VERSION, MULTI_PUBLISHER_TAGS)
#define MULTI_PUBLISHER_TAGS
#define MULTI_PUBLISHER_VERSION
Definition adc.hpp:75
A version with tags list.
Definition types.hpp:24