Public Member Functions | Protected Member Functions | Private Attributes | List of all members
RTC::NullBuffer< DataType > Class Template Reference

Concrete buffer class for dummy. More...

#include <BufferBase.h>

Inheritance diagram for RTC::NullBuffer< DataType >:
Inheritance graph
[legend]

Public Member Functions

virtual bool isEmpty (void) const
 Check on whether the buffer is empty. More...
 
virtual bool isFull (void) const
 Check on whether the buffer is full. More...
 
virtual long int length (void) const
 Get the buffer length (always 1) More...
 
 NullBuffer (long int size=1)
 Constructer. More...
 
virtual bool read (DataType &value)
 Read data from the buffer. More...
 
virtual bool write (const DataType &value)
 Write data into the buffer. More...
 
virtual ~NullBuffer (void)
 Destructor. More...
 
- Public Member Functions inherited from RTC::BufferBase< DataType >
virtual ReturnCode advanceRptr (long int n=1)=0
 Forward n reading pointers. More...
 
virtual ReturnCode advanceWptr (long int n=1)=0
 Forward n writing pointers. More...
 
virtual bool empty (void) const =0
 Check on whether the buffer is empty. More...
 
virtual bool full (void) const =0
 Check on whether the buffer is full. More...
 
virtual ReturnCode get (DataType &value)=0
 Read data from the buffer. More...
 
virtual void init (const coil::Properties &prop)=0
 Set the buffer. More...
 
virtual ReturnCode length (size_t n)=0
 Set the buffer length. More...
 
virtual ReturnCode read (DataType &value, long int sec=-1, long int nsec=-1)=0
 Read data from the buffer. More...
 
virtual size_t readable () const =0
 Write data into the buffer. More...
 
virtual ReturnCode reset ()=0
 Reset the buffer status. More...
 
virtual DataType * rptr (long int n=0)=0
 Get the reading pointer. More...
 
virtual DataType * wptr (long int n=0)=0
 Get the writing pointer. More...
 
virtual size_t writable () const =0
 Get a writable number. More...
 
virtual ReturnCode write (const DataType &value, long int sec=-1, long int nsec=-1)=0
 Write data into the buffer. More...
 
virtual BUFFERSTATUS_ENUM ~BufferBase (void)
 Virtual destructor. More...
 

Protected Member Functions

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

Private Attributes

DataType m_data
 
long int m_length
 

Additional Inherited Members

- Public Types inherited from RTC::BufferStatus
enum  Enum {
  BUFFER_OK = 0, BUFFER_ERROR, BUFFER_FULL, BUFFER_EMPTY,
  NOT_SUPPORTED, TIMEOUT, PRECONDITION_NOT_MET
}
 DataPortStatus return codes. More...
 
- Static Public Member Functions inherited from RTC::BufferStatus
static const char * toString (Enum status)
 Convert BufferStatus into the string. More...
 

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
DataTypeData type to hold in a buffer
Since
0.4.0

Definition at line 552 of file BufferBase.h.

Constructor & Destructor Documentation

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

Constructer.

Constructer. Initialize buffer length to always 1.

Parameters
sizeBuffer length(Not use)

Definition at line 577 of file BufferBase.h.

template<class DataType >
virtual RTC::NullBuffer< DataType >::~NullBuffer ( void  )
inlinevirtual

Destructor.

Destractor

Definition at line 597 of file BufferBase.h.

Member Function Documentation

template<class DataType >
virtual const DataType& RTC::NullBuffer< DataType >::get ( void  )
inlineprotectedvirtual

Get data from the buffer.

Get data from the buffer.

Returns
Data got from buffer.

Implements RTC::BufferBase< DataType >.

Definition at line 775 of file BufferBase.h.

template<class DataType >
virtual DataType& RTC::NullBuffer< DataType >::getRef ( void  )
inlineprotectedvirtual

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)

Definition at line 802 of file BufferBase.h.

template<class DataType >
virtual bool RTC::NullBuffer< DataType >::isEmpty ( void  ) const
inlinevirtual

Check on whether the buffer is empty.

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

Returns
Always false.

Definition at line 726 of file BufferBase.h.

template<class DataType >
virtual bool RTC::NullBuffer< DataType >::isFull ( void  ) const
inlinevirtual

Check on whether the buffer is full.

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

Returns
Always false.

Definition at line 702 of file BufferBase.h.

template<class DataType >
virtual long int RTC::NullBuffer< DataType >::length ( void  ) const
inlinevirtual

Get the buffer length (always 1)

Get the buffer length. (Return always 1.)

Returns
buffer length(always 1)

Implements RTC::BufferBase< DataType >.

Definition at line 620 of file BufferBase.h.

template<class DataType >
virtual void RTC::NullBuffer< DataType >::put ( const DataType &  data)
inlineprotectedvirtual

Store data into the buffer.

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

Parameters
dataTarget data to store.

Implements RTC::BufferBase< DataType >.

Definition at line 751 of file BufferBase.h.

template<class DataType >
virtual bool RTC::NullBuffer< DataType >::read ( DataType &  value)
inlinevirtual

Read data from the buffer.

Read data stored in the buffer.

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

Definition at line 677 of file BufferBase.h.

template<class DataType >
virtual bool RTC::NullBuffer< DataType >::write ( const DataType &  value)
inlinevirtual

Write data into the buffer.

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

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

Definition at line 648 of file BufferBase.h.

Member Data Documentation

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

Definition at line 808 of file BufferBase.h.

template<class DataType >
long int RTC::NullBuffer< DataType >::m_length
private

Definition at line 809 of file BufferBase.h.


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


openrtm_aist
Author(s): Noriaki Ando
autogenerated on Thu Jun 6 2019 19:26:04