RTC::OutPortBase Class Reference

Output base class. More...

#include <OutPortBase.h>

Inheritance diagram for RTC::OutPortBase:

RTC::OutPort< DataType, Buffer >

List of all members.

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.
PublisherBasedetach (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...


Detailed Description

Output base class.

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.

Since:
0.2.0

Constructor & Destructor Documentation

RTC::OutPortBase::OutPortBase ( const char *  name  )  [inline]

Constructor.

Constructor

Parameters:
name Port name

virtual RTC::OutPortBase::~OutPortBase (  )  [virtual]

Destructor.

Destructor Detach all subscribed Publishers.


Member Function Documentation

const char* RTC::OutPortBase::name (  )  [inline]

Retrieve OutPort name.

Retrieve OutPort name

Returns:
the port name

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().

Parameters:
id ID assigned to the Publisher that is specified
publisher The target Publisher object for attachment

void RTC::OutPortBase::attach_front ( const char *  id,
PublisherBase publisher 
)

Attach the publisher to the top of the Publisher list.

Attach the publisher to the top of the Publisher list.

Parameters:
id ID assigned to the Publisher that is specified
publisher The target Publisher object for attachment

void RTC::OutPortBase::attach_back ( const char *  id,
PublisherBase publisher 
)

Attach the publisher at the end of the Publisher list.

Attach the publisher to the end of the Publisher list.

Parameters:
id ID assigned to the Publisher that is specified
publisher The target Publisher object for attachment

PublisherBase* RTC::OutPortBase::detach ( const char *  id  ) 

Detach the publisher.

Detach the specified Publisher from the update notification list

Parameters:
id ID of the deleted Publisher
Returns:
The deleted publisher object if the deletion completed successfully. Null if the specified Publisher does not exist.

void RTC::OutPortBase::notify (  ) 

Notify the data updates.

Notify data updates to all registered Publishers


Member Data Documentation

std::string RTC::OutPortBase::m_name [protected]

Port name.

std::vector<Publisher*> RTC::OutPortBase::m_publishers [protected]

Registered Publisher list.


Generated on Wed May 21 05:17:34 2008 for OpenRTM by  doxygen 1.5.3