CCA
|
CCA Buffering interface. More...
#include <Buffer.h>
Public Types | |
typedef ::boost::shared_ptr < DATATYPE > | DataPtr |
Defines a shared pointer for the data-type of this buffer. | |
Public Member Functions | |
Buffering () | |
virtual | ~Buffering () |
virtual DataPtr | get ()=0 throw () |
Getting an item from the buffer. | |
virtual void | add (DataPtr item)=0 |
Add a new item to the 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 void | purge ()=0 |
Purging buffer, emptying all items letting the configuration untouched. | |
Protected Member Functions | |
Buffering (Buffering &buffer) | |
Copy constructor Copy constructor private for now to disallow copying. | |
void | operator= (const Buffering &) |
Copy operator Copy operator private for now to disallow copying. |
Detailed Description
template<class DATATYPE>
class cca::Buffering< DATATYPE >
CCA Buffering interface.
Member Typedef Documentation
typedef ::boost::shared_ptr<DATATYPE> cca::Buffering< DATATYPE >::DataPtr |
Defines a shared pointer for the data-type of this buffer.
Reimplemented in cca::InputPort< DATATYPE >, cca::InputPort< ComponentState >, cca::InputPort< cca::timing::Tick >, cca::InputPort< DTOTYPE >, cca::Buffer< DATATYPE >, cca::Buffer< ComponentState >, cca::Buffer< cca::timing::Tick >, cca::Buffer< DTOTYPE >, cca::SingleItemBuffer< DATATYPE >, and cca::SynchronizedQueue< DATATYPE >.
Constructor & Destructor Documentation
cca::Buffering< DATATYPE >::Buffering | ( | ) | [inline] |
virtual cca::Buffering< DATATYPE >::~Buffering | ( | ) | [inline, virtual] |
cca::Buffering< DATATYPE >::Buffering | ( | Buffering< DATATYPE > & | buffer | ) | [protected] |
Copy constructor Copy constructor private for now to disallow copying.
Member Function Documentation
virtual void cca::Buffering< DATATYPE >::add | ( | DataPtr | item | ) | [pure virtual] |
Add a new item to the buffer.
Implemented in cca::InputPort< DATATYPE >, cca::InputPort< ComponentState >, cca::InputPort< cca::timing::Tick >, cca::InputPort< DTOTYPE >, cca::Buffer< DATATYPE >, cca::Buffer< ComponentState >, cca::Buffer< cca::timing::Tick >, cca::Buffer< DTOTYPE >, cca::SingleItemBuffer< DATATYPE >, and cca::SynchronizedQueue< DATATYPE >.
virtual bool cca::Buffering< DATATYPE >::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 >, cca::InputPort< DTOTYPE >, cca::Buffer< DATATYPE >, cca::Buffer< ComponentState >, cca::Buffer< cca::timing::Tick >, and cca::Buffer< DTOTYPE >.
virtual DataPtr cca::Buffering< DATATYPE >::get | ( | ) | throw () [pure virtual] |
Getting an item from the buffer.
Implemented in cca::InputPort< DATATYPE >, cca::InputPort< ComponentState >, cca::InputPort< cca::timing::Tick >, cca::InputPort< DTOTYPE >, cca::Buffer< DATATYPE >, cca::Buffer< ComponentState >, cca::Buffer< cca::timing::Tick >, cca::Buffer< DTOTYPE >, cca::SingleItemBuffer< DATATYPE >, and cca::SynchronizedQueue< DATATYPE >.
virtual bool cca::Buffering< DATATYPE >::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 >, cca::InputPort< DTOTYPE >, cca::Buffer< DATATYPE >, cca::Buffer< ComponentState >, cca::Buffer< cca::timing::Tick >, and cca::Buffer< DTOTYPE >.
void cca::Buffering< DATATYPE >::operator= | ( | const Buffering< DATATYPE > & | ) | [protected] |
Copy operator Copy operator private for now to disallow copying.
virtual void cca::Buffering< DATATYPE >::purge | ( | ) | [pure virtual] |
Purging buffer, emptying all items letting the configuration untouched.
Implemented in cca::InputPort< DATATYPE >, cca::InputPort< ComponentState >, cca::InputPort< cca::timing::Tick >, cca::InputPort< DTOTYPE >, cca::Buffer< DATATYPE >, cca::Buffer< ComponentState >, cca::Buffer< cca::timing::Tick >, cca::Buffer< DTOTYPE >, cca::SynchronizedQueue< DATATYPE >, and cca::SingleItemBuffer< DATATYPE >.
virtual unsigned int cca::Buffering< DATATYPE >::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 >, cca::InputPort< DTOTYPE >, cca::Buffer< DATATYPE >, cca::Buffer< ComponentState >, cca::Buffer< cca::timing::Tick >, cca::Buffer< DTOTYPE >, and cca::SynchronizedQueue< DATATYPE >.
The documentation for this class was generated from the following file:
- cca/buffer/Buffer.h