RTC::BufferBase< DataType > Class Template Reference

BufferBase abstract class. More...

#include <BufferBase.h>

Inheritance diagram for RTC::BufferBase< DataType >:

RTC::BufferStatus RTC::NullBuffer< DataType > RTC::RingBuffer< DataType > RTC::SyncFIFO< DataType > RTC::SyncLIFO< DataType >

List of all members.

Public Member Functions

virtual BUFFERSTATUS_ENUM ~BufferBase (void)
 Virtual destructor.
virtual void init (const coil::Properties &prop)=0
virtual size_t length (void) const =0
 Get the buffer length.
virtual ReturnCode length (size_t n)=0
 Get the buffer length.
virtual ReturnCode reset ()=0
 Get the buffer length.
virtual DataType * wptr (long int n=0)=0
 Get the buffer length.
virtual ReturnCode advanceWptr (long int n=1)=0
 Get the buffer length.
virtual ReturnCode put (const DataType &value)=0
 Write data into the buffer.
virtual ReturnCode write (const DataType &value, long int sec=-1, long int nsec=-1)=0
 Write data into the buffer.
virtual size_t writable () const =0
 Write data into the buffer.
virtual bool full (void) const =0
 Check on whether the buffer is full.
virtual DataType * rptr (long int n=0)=0
 Get the buffer length.
virtual ReturnCode advanceRptr (long int n=1)=0
 Get the buffer length.
virtual ReturnCode get (DataType &value)=0
 Write data into the buffer.
virtual DataType & get ()=0
virtual ReturnCode read (DataType &value, long int sec=-1, long int nsec=-1)=0
 Read data from the buffer.
virtual size_t readable () const =0
 Write data into the buffer.
virtual bool empty (void) const =0
 Check on whether the buffer is empty.


Detailed Description

template<class DataType>
class RTC::BufferBase< DataType >

BufferBase abstract class.

This is the abstract interface class for various Buffer. Concrete buffer classes must implement the following pure virtual functions. The users specify data type to hold it in a buffer as <DataType>.

This class provides public interface as follows.

This class provides protected interface as follows.

Parameters:
DataType Data type to be stored to the buffer.
Since:
0.4.0

Constructor & Destructor Documentation

template<class DataType>
virtual BUFFERSTATUS_ENUM RTC::BufferBase< DataType >::~BufferBase ( void   )  [inline, virtual]

Virtual destructor.


Member Function Documentation

template<class DataType>
virtual void RTC::BufferBase< DataType >::init ( const coil::Properties &  prop  )  [pure virtual]

Implemented in RTC::RingBuffer< DataType >.

template<class DataType>
virtual size_t RTC::BufferBase< DataType >::length ( void   )  const [pure virtual]

Get the buffer length.

Pure virtual function to get the buffer length.

Returns:
buffer length

Implemented in RTC::NullBuffer< DataType >, RTC::RingBuffer< DataType >, RTC::SyncFIFO< DataType >, and RTC::SyncLIFO< DataType >.

template<class DataType>
virtual ReturnCode RTC::BufferBase< DataType >::length ( size_t  n  )  [pure virtual]

Get the buffer length.

Pure virtual function to get the buffer length.

Returns:
buffer length

Implemented in RTC::RingBuffer< DataType >.

template<class DataType>
virtual ReturnCode RTC::BufferBase< DataType >::reset (  )  [pure virtual]

Get the buffer length.

Pure virtual function to get the buffer length.

Returns:
buffer length

Implemented in RTC::RingBuffer< DataType >.

template<class DataType>
virtual DataType* RTC::BufferBase< DataType >::wptr ( long int  n = 0  )  [pure virtual]

Get the buffer length.

Pure virtual function to get the buffer length.

Returns:
buffer length

Implemented in RTC::RingBuffer< DataType >.

template<class DataType>
virtual ReturnCode RTC::BufferBase< DataType >::advanceWptr ( long int  n = 1  )  [pure virtual]

Get the buffer length.

Pure virtual function to get the buffer length.

Returns:
buffer length

Implemented in RTC::RingBuffer< DataType >.

template<class DataType>
virtual ReturnCode RTC::BufferBase< DataType >::put ( const DataType &  value  )  [pure virtual]

Write data into the buffer.

Pure virtual function to write data into the buffer.

Parameters:
value Target data to write.
Returns:
Result of having written in data (true:Successful, false:Failed)

Implemented in RTC::NullBuffer< DataType >, RTC::RingBuffer< DataType >, RTC::SyncFIFO< DataType >, and RTC::SyncLIFO< DataType >.

template<class DataType>
virtual ReturnCode RTC::BufferBase< DataType >::write ( const DataType &  value,
long int  sec = -1,
long int  nsec = -1 
) [pure virtual]

Write data into the buffer.

Pure virtual function to write data into the buffer.

Parameters:
value Target data to write.
Returns:
Result of having written in data (true:Successful, false:Failed)

Implemented in RTC::RingBuffer< DataType >.

template<class DataType>
virtual size_t RTC::BufferBase< DataType >::writable (  )  const [pure virtual]

Write data into the buffer.

Pure virtual function to write data into the buffer.

Parameters:
value Target data to write.
Returns:
Result of having written in data (true:Successful, false:Failed)

Implemented in RTC::RingBuffer< DataType >.

template<class DataType>
virtual bool RTC::BufferBase< DataType >::full ( void   )  const [pure virtual]

Check on whether the buffer is full.

Pure virtual function to check on whether the buffer is full.

Returns:
True if the buffer is full, else false.

Implemented in RTC::RingBuffer< DataType >.

template<class DataType>
virtual DataType* RTC::BufferBase< DataType >::rptr ( long int  n = 0  )  [pure virtual]

Get the buffer length.

Pure virtual function to get the buffer length.

Returns:
buffer length

Implemented in RTC::RingBuffer< DataType >.

template<class DataType>
virtual ReturnCode RTC::BufferBase< DataType >::advanceRptr ( long int  n = 1  )  [pure virtual]

Get the buffer length.

Pure virtual function to get the buffer length.

Returns:
buffer length

Implemented in RTC::RingBuffer< DataType >.

template<class DataType>
virtual ReturnCode RTC::BufferBase< DataType >::get ( DataType &  value  )  [pure virtual]

Write data into the buffer.

Pure virtual function to write data into the buffer.

Parameters:
value Target data to write.
Returns:
Result of having written in data (true:Successful, false:Failed)

Implemented in RTC::RingBuffer< DataType >.

template<class DataType>
virtual DataType& RTC::BufferBase< DataType >::get (  )  [pure virtual]

Implemented in RTC::NullBuffer< DataType >, RTC::RingBuffer< DataType >, RTC::SyncFIFO< DataType >, and RTC::SyncLIFO< DataType >.

template<class DataType>
virtual ReturnCode RTC::BufferBase< DataType >::read ( DataType &  value,
long int  sec = -1,
long int  nsec = -1 
) [pure virtual]

Read data from the buffer.

Pure virtual function to read data from the buffer.

Parameters:
value Read data.
Returns:
Result of having read (true:Successful, false:Failed)

Implemented in RTC::RingBuffer< DataType >.

template<class DataType>
virtual size_t RTC::BufferBase< DataType >::readable (  )  const [pure virtual]

Write data into the buffer.

Pure virtual function to write data into the buffer.

Parameters:
value Target data to write.
Returns:
Result of having written in data (true:Successful, false:Failed)

Implemented in RTC::RingBuffer< DataType >, RTC::SyncFIFO< DataType >, and RTC::SyncLIFO< DataType >.

template<class DataType>
virtual bool RTC::BufferBase< DataType >::empty ( void   )  const [pure virtual]

Check on whether the buffer is empty.

Pure virtual function to check on whether the buffer is empty.

Returns:
True if the buffer is empty, else false.

Implemented in RTC::RingBuffer< DataType >.


Generated on Sun May 24 14:08:45 2009 for OpenRTM by  doxygen 1.5.3