20 #ifndef RTC_BUFFERBASE_H    21 #define RTC_BUFFERBASE_H   103   template <
class DataType>
   157     virtual size_t length(
void) 
const = 0;
   183     virtual ReturnCode 
length(
size_t n) = 0;
   208     virtual ReturnCode 
reset() = 0;
   233     virtual DataType* 
wptr(
long int n = 0) = 0;
   257     virtual ReturnCode 
advanceWptr(
long int n = 1, 
bool unlock_enable = 
true) = 0;
   284     virtual ReturnCode 
put(
const DataType& value) = 0;
   311     virtual ReturnCode 
write(
const DataType& value,
   312                              long int sec = -1, 
long int nsec = -1) = 0;
   335     virtual size_t writable() 
const = 0;
   356     virtual bool full(
void) 
const = 0;
   379     virtual DataType* 
rptr(
long int n = 0) = 0;
   403     virtual ReturnCode 
advanceRptr(
long int n = 1, 
bool unlock_enable = 
true) = 0;
   430     virtual ReturnCode 
get(DataType& value) = 0;
   451     virtual DataType&  
get() = 0;
   476     virtual ReturnCode 
read(DataType& value,
   477                             long int sec = -1, 
long int nsec = -1) = 0;
   500     virtual size_t readable() 
const = 0;
   521     virtual bool empty(
void) 
const = 0;
   551   template <
class DataType>
   648     virtual bool write(
const DataType& value)
   677     virtual bool read(DataType& value)
   751     virtual void put(
const DataType& data)
   775     virtual const DataType& 
get(void)
   812 #endif // BufferBase_h virtual bool isEmpty(void) const 
Check on whether the buffer is empty. 
Definition: BufferBase.h:726
 
virtual ReturnCode advanceRptr(long int n=1, bool unlock_enable=true)=0
Forward n reading pointers. 
 
Concrete buffer class for dummy. 
Definition: BufferBase.h:552
 
virtual size_t writable() const =0
Get a writable number. 
 
virtual ReturnCode advanceWptr(long int n=1, bool unlock_enable=true)=0
Forward n writing pointers. 
 
NullBuffer(long int size=1)
Constructer. 
Definition: BufferBase.h:577
 
virtual bool read(DataType &value)
Read data from the buffer. 
Definition: BufferBase.h:677
 
virtual BUFFERSTATUS_ENUM ~BufferBase(void)
Virtual destructor. 
Definition: BufferBase.h:121
 
virtual ReturnCode put(const DataType &value)=0
Write data into the buffer. 
 
BufferStatus mixin class. 
Definition: BufferStatus.h:52
 
virtual ReturnCode reset()=0
Reset the buffer status. 
 
virtual long int length(void) const 
Get the buffer length (always 1) 
Definition: BufferBase.h:620
 
virtual DataType * wptr(long int n=0)=0
Get the writing pointer. 
 
#define BUFFERSTATUS_ENUM
Importing RTC::BufferStatus macro. 
Definition: BufferStatus.h:157
 
Buffer status enum definition. 
 
virtual bool full(void) const =0
Check on whether the buffer is full. 
 
virtual DataType * rptr(long int n=0)=0
Get the reading pointer. 
 
virtual DataType & getRef(void)
Get the buffer's reference to be written the next. 
Definition: BufferBase.h:802
 
virtual ReturnCode read(DataType &value, long int sec=-1, long int nsec=-1)=0
Read data from the buffer. 
 
Class represents a set of properties. 
Definition: Properties.h:101
 
Property list class (derived from Java Properties) 
 
virtual size_t readable() const =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 bool isFull(void) const 
Check on whether the buffer is full. 
Definition: BufferBase.h:702
 
virtual void put(const DataType &data)
Store data into the buffer. 
Definition: BufferBase.h:751
 
virtual void init(const coil::Properties &prop)=0
Set the buffer. 
 
BufferBase abstract class. 
Definition: BufferBase.h:104
 
virtual bool write(const DataType &value)
Write data into the buffer. 
Definition: BufferBase.h:648
 
virtual ~NullBuffer(void)
Destructor. 
Definition: BufferBase.h:597
 
virtual bool empty(void) const =0
Check on whether the buffer is empty. 
 
virtual size_t length(void) const =0
Get the buffer length.