RTC Toolkit 6.0.0
Loading...
Searching...
No Matches
statePublisher.hpp
Go to the documentation of this file.
1
11
12#ifndef RTCTK_COMPONENTFRAMEWORK_STATEPUBLISHER_HPP
13#define RTCTK_COMPONENTFRAMEWORK_STATEPUBLISHER_HPP
14
15#include <mal/utility/Uri.hpp>
16
17#include <memory>
18
19namespace elt::mal::ps {
20template <typename TOPIC_TYPE>
22}
23
24namespace stdif {
25class State;
26}
27
29
36public:
37 StatePublisher(const elt::mal::Uri& uri, const std::string& name);
38
39 // no copy allowed
40 StatePublisher(const StatePublisher& other) = delete;
41 StatePublisher& operator=(const StatePublisher& other) = delete;
42
43 // move it instead
44 StatePublisher(StatePublisher&& other) = default;
46
47 virtual ~StatePublisher() = default;
48
49 void PublishState(const std::string& state);
50
51private:
52 // cppcheck-suppress-begin unusedStructMember
53
54 std::unique_ptr<elt::mal::ps::Publisher<stdif::State>> m_publisher;
55 std::string m_name;
56
57 // cppcheck-suppress-end unusedStructMember
58};
59} // namespace rtctk::componentFramework
60
61#endif // RTCTK_COMPONENTFRAMEWORK_STATEPUBLISHER_HPP
Definition statePublisher.hpp:21
StatePublisher & operator=(StatePublisher &&other)=default
StatePublisher(StatePublisher &&other)=default
StatePublisher & operator=(const StatePublisher &other)=delete
StatePublisher(const StatePublisher &other)=delete
StatePublisher(const elt::mal::Uri &uri, const std::string &name)
Definition statePublisher.cpp:23
void PublishState(const std::string &state)
Definition statePublisher.cpp:40
Definition statePublisher.hpp:19
Definition commandReplier.cpp:21
Definition statePublisher.hpp:24