CCA

InputPort base class. More...

#include <InputPort.h>

Inheritance diagram for cca::InputPortBase:
Collaboration diagram for cca::InputPortBase:

List of all members.

Classes

class  InputHandler

Public Member Functions

 InputPortBase (bool optional=false, const std::string &datatype="unknown")
 Protected constructor.
virtual void configureSpecifics ()
virtual void setHandler (::rsb::HandlerPtr handler)
virtual void purge ()=0
 Purge all items from input port buffer.
virtual bool empty () const =0
 Returns, if buffer is empty.
virtual bool newItem () const =0
 Returns, if buffer is empty.
virtual unsigned int size () const =0
 Returns number of buffered items.
virtual ~InputPortBase ()

Protected Member Functions

 InputPortBase (InputPortBase &port)
 Copy constructor Copy constructor private for now to disallow copying.
void operator= (const InputPortBase &port)
 Copy operator Copy operator private for now to disallow copying.

Protected Attributes

boost::shared_ptr< InputHandlerhandler
::rsb::ListenerPtr listener
 RSB Listener.
rsc::logging::LoggerPtr logger

Detailed Description

InputPort base class.

Definition at line 48 of file InputPort.h.


Constructor & Destructor Documentation

cca::InputPortBase::InputPortBase ( bool  optional = false,
const std::string &  datatype = "unknown" 
)

Protected constructor.

Parameters:
datatype(Optional) Port type for debugging information
Todo:
Better handling of exception, when rsb transport for the selected InputPort type is not avaiable.

Definition at line 46 of file InputPort.cpp.

Definition at line 51 of file InputPort.cpp.

References handler, and listener.

Copy constructor Copy constructor private for now to disallow copying.


Member Function Documentation

virtual bool cca::InputPortBase::empty ( ) const [pure virtual]

Returns, if buffer is empty.

If buffer is configured to always keep the latest item, this is only the case until first item arrived. This method should be implemented fast, because its heavily frequented by CCA.

Implemented in cca::InputPort< DATATYPE >, cca::InputPort< ComponentState >, cca::InputPort< cca::timing::Tick >, and cca::InputPort< DTOTYPE >.

virtual bool cca::InputPortBase::newItem ( ) const [pure virtual]

Returns, if buffer is empty.

If buffer is configured to always keep the latest item, this is only the case until first item arrived. This method should be implemented fast, because its heavily frequented by CCA.

Implemented in cca::InputPort< DATATYPE >, cca::InputPort< ComponentState >, cca::InputPort< cca::timing::Tick >, and cca::InputPort< DTOTYPE >.

void cca::InputPortBase::operator= ( const InputPortBase port) [protected]

Copy operator Copy operator private for now to disallow copying.

virtual void cca::InputPortBase::purge ( ) [pure virtual]
void cca::InputPortBase::setHandler ( ::rsb::HandlerPtr  handler) [virtual]
Returns:

Definition at line 70 of file InputPort.cpp.

References handler.

Referenced by cca::Component::createBeatInputPort(), and cca::Component::createStateInputPort().

Here is the caller graph for this function:

virtual unsigned int cca::InputPortBase::size ( ) const [pure virtual]

Returns number of buffered items.

(NOT including the kept item if keepLatest active. This method should be implemented fast, because its heavily frequented by CCA.

Implemented in cca::InputPort< DATATYPE >, cca::InputPort< ComponentState >, cca::InputPort< cca::timing::Tick >, and cca::InputPort< DTOTYPE >.


Member Data Documentation

::rsb::ListenerPtr cca::InputPortBase::listener [protected]

RSB Listener.

Definition at line 161 of file InputPort.h.

Referenced by configureSpecifics(), and ~InputPortBase().


The documentation for this class was generated from the following files: