38 #ifndef ORO_CORELIB_BUFFERINTERFACE_HPP 39 #define ORO_CORELIB_BUFFERINTERFACE_HPP 42 #include "../FlowStatus.hpp" 43 #include <boost/shared_ptr.hpp> 44 #include <boost/call_traits.hpp> 63 typedef boost::shared_ptr< BufferInterface<T> >
shared_ptr;
64 typedef typename boost::call_traits<T>::param_type
param_t;
65 typedef typename boost::call_traits<T>::reference
reference_t;
87 virtual size_type
Pop( std::vector<value_t>& items ) = 0;
105 virtual void Release(value_t *item) = 0;
114 virtual bool Push( param_t item) = 0;
123 virtual size_type
Push(
const std::vector<value_t>& items ) = 0;
137 virtual bool data_sample( param_t sample,
bool reset =
true ) = 0;
virtual FlowStatus Pop(reference_t item)=0
Read the oldest value from the buffer.
boost::call_traits< T >::reference reference_t
A Buffer is an object which is used to store (Push) and retrieve (Pop) values from.
FlowStatus
Returns the status of a data flow read operation.
virtual bool Push(param_t item)=0
Write a single value to the buffer.
boost::call_traits< T >::param_type param_t
virtual value_t data_sample() const =0
Reads back a data sample.
virtual void Release(value_t *item)=0
Releases the pointer.
virtual value_t * PopWithoutRelease()=0
Returns a pointer to the first element in the buffer.
BufferBase::size_type size_type
virtual ~BufferInterface()
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
Any Buffer has a capacity, size and can be empty or full.
boost::shared_ptr< BufferInterface< T > > shared_ptr