38 #ifndef ORO_CORELIB_BUFFERINTERFACE_HPP 39 #define ORO_CORELIB_BUFFERINTERFACE_HPP 42 #include <boost/shared_ptr.hpp> 43 #include <boost/call_traits.hpp> 62 typedef boost::shared_ptr< BufferInterface<T> >
shared_ptr;
63 typedef typename boost::call_traits<T>::param_type
param_t;
64 typedef typename boost::call_traits<T>::reference
reference_t;
76 virtual bool Pop( reference_t item) = 0;
86 virtual size_type
Pop( std::vector<value_t>& items ) = 0;
104 virtual void Release(value_t *item) = 0;
113 virtual bool Push( param_t item) = 0;
122 virtual size_type
Push(
const std::vector<value_t>& items ) = 0;
boost::call_traits< T >::reference reference_t
A Buffer is an object which is used to store (Push) and retrieve (Pop) values from.
virtual bool Push(param_t item)=0
Write a single value to the buffer.
boost::call_traits< T >::param_type param_t
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()
virtual bool Pop(reference_t item)=0
Read the oldest value from the buffer.
virtual T data_sample() const =0
Reads back a data sample.
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