RTC::NullBuffer< DataType > Class Template Reference

Concrete buffer class for dummy. More...

#include <BufferBase.h>

Inheritance diagram for RTC::NullBuffer< DataType >:
RTC::BufferBase< DataType > RTC::BufferStatus

List of all members.

Public Member Functions

 NullBuffer (long int size=1)
 Constructer.
virtual ~NullBuffer (void)
 Destructor.
virtual long int length (void) const
 Get the buffer length (always 1).
virtual bool write (const DataType &value)
 Write data into the buffer.
virtual bool read (DataType &value)
 Read data from the buffer.
virtual bool isFull (void) const
 Check on whether the buffer is full.
virtual bool isEmpty (void) const
 Check on whether the buffer is empty.

Protected Member Functions

virtual void put (const DataType &data)
 Store data into the buffer.
virtual const DataType & get (void)
 Get data from the buffer.
virtual DataType & getRef (void)
 Get the buffer's reference to be written the next.

Detailed Description

template<class DataType>
class RTC::NullBuffer< DataType >

Concrete buffer class for dummy.

Concrete buffer class for dummy. Buffer length is fixed to 1. The users specify data type to hold it in a buffer as <DataType>.

Parameters:
DataType Data type to hold in a buffer
Since:
0.4.0

Constructor & Destructor Documentation

template<class DataType >
RTC::NullBuffer< DataType >::NullBuffer ( long int  size = 1  )  [inline]

Constructer.

Constructer. Initialize buffer length to always 1.

Parameters:
size Buffer length(Not use)
template<class DataType >
virtual RTC::NullBuffer< DataType >::~NullBuffer ( void   )  [inline, virtual]

Destructor.

Destractor


Member Function Documentation

template<class DataType >
virtual const DataType& RTC::NullBuffer< DataType >::get ( void   )  [inline, protected, virtual]

Get data from the buffer.

Get data from the buffer.

Returns:
Data got from buffer.

Implements RTC::BufferBase< DataType >.

template<class DataType >
virtual DataType& RTC::NullBuffer< DataType >::getRef ( void   )  [inline, protected, virtual]

Get the buffer's reference to be written the next.

Get the reference to be written buffer. Return always same position because this buffer's length is always 1.

Returns:
Reference to be written the next(always same)
template<class DataType >
virtual bool RTC::NullBuffer< DataType >::isEmpty ( void   )  const [inline, virtual]

Check on whether the buffer is empty.

Check on whether the buffer is empty. (Always false.)

Returns:
Always false.
template<class DataType >
virtual bool RTC::NullBuffer< DataType >::isFull ( void   )  const [inline, virtual]

Check on whether the buffer is full.

Check on whether the buffer is full. (Always false.)

Returns:
Always false.
template<class DataType >
virtual long int RTC::NullBuffer< DataType >::length ( void   )  const [inline, virtual]

Get the buffer length (always 1).

Get the buffer length. (Return always 1.)

Returns:
buffer length(always 1)

Implements RTC::BufferBase< DataType >.

template<class DataType >
virtual void RTC::NullBuffer< DataType >::put ( const DataType &  data  )  [inline, protected, virtual]

Store data into the buffer.

Store data which were given with an argument into the buffer.

Parameters:
data Target data to store.

Implements RTC::BufferBase< DataType >.

template<class DataType >
virtual bool RTC::NullBuffer< DataType >::read ( DataType &  value  )  [inline, virtual]

Read data from the buffer.

Read data stored in the buffer.

Parameters:
value Read data.
Returns:
Result of having read (true:Successful, false:Failed)
template<class DataType >
virtual bool RTC::NullBuffer< DataType >::write ( const DataType &  value  )  [inline, virtual]

Write data into the buffer.

Write data which were given with an argument into the buffer.

Parameters:
value Target data to write.
Returns:
Result of having written in data (true:Successful, false:Failed)
Generated on Fri Oct 28 18:31:18 2016 for OpenRTM-aist by  doxygen 1.6.3