#include <OutPortBase.h>
Public Member Functions | |
OutPortBase (const char *name) | |
Constructor. | |
virtual | ~OutPortBase () |
Destructor. | |
const char * | name () |
Retrieve OutPort name. | |
void | attach (const char *id, PublisherBase *publisher) |
Attach the publisher. | |
void | attach_front (const char *id, PublisherBase *publisher) |
Attach the publisher to the top of the Publisher list. | |
void | attach_back (const char *id, PublisherBase *publisher) |
Attach the publisher at the end of the Publisher list. | |
PublisherBase * | detach (const char *id) |
Detach the publisher. | |
void | notify () |
Notify the data updates. | |
Protected Attributes | |
std::string | m_name |
Port name. | |
std::vector < Publisher * > | m_publishers |
Registered Publisher list. | |
Classes | |
struct | Publisher |
Structure of Publisher. More... |
The base class of OutPort<T> which are implementations of OutPort
Form a kind of Observer pattern with OutPortBase and PublisherBase. attach(), detach(), notify() of OutPortBase and push() of PublisherBase are methods associated with the Observer pattern.
RTC::OutPortBase::OutPortBase | ( | const char * | name | ) | [inline] |
Constructor.
Constructor
name | Port name |
virtual RTC::OutPortBase::~OutPortBase | ( | ) | [virtual] |
Destructor.
Destructor Detach all subscribed Publishers.
const char* RTC::OutPortBase::name | ( | ) | [inline] |
void RTC::OutPortBase::attach | ( | const char * | id, | |
PublisherBase * | publisher | |||
) |
Attach the publisher.
Attach the specified publisher as the destination of the data update notification to the end of the Publisher list. This function is similar to attach_back().
void RTC::OutPortBase::attach_front | ( | const char * | id, | |
PublisherBase * | publisher | |||
) |
void RTC::OutPortBase::attach_back | ( | const char * | id, | |
PublisherBase * | publisher | |||
) |
PublisherBase* RTC::OutPortBase::detach | ( | const char * | id | ) |
void RTC::OutPortBase::notify | ( | ) |
Notify the data updates.
Notify data updates to all registered Publishers
std::string RTC::OutPortBase::m_name [protected] |
Port name.
std::vector<Publisher*> RTC::OutPortBase::m_publishers [protected] |
Registered Publisher list.