& getPublisher();
virtual void stop();
protected:
explicit Component(const std::string& sName, uint32_t iCapacity = UINT32_MAX, bool bManaged = true);
SubscriberQueue m_oSubscriber;
BasicPublisher
m_oPublisher;
private:
};
template & Component::Component(
const std::string& name, uint32_t capacity, bool managed)
: Thread(name, managed), m_oSubscriber(name, capacity) {
}
template::~Component() {
Component::stop();
}
template& Component::getSubscriber() {
return m_oSubscriber;
}
template::getPublisher() {
return m_oPublisher;
}
template::stop() {
Thread::stop();
m_oSubscriber.clear();
}
}
#endif