39 #ifndef ORO_CHANNEL_BUFFER_ELEMENT_HPP 40 #define ORO_CHANNEL_BUFFER_ELEMENT_HPP 42 #include "../base/ChannelElement.hpp" 43 #include "../base/BufferInterface.hpp" 44 #include "../ConnPolicy.hpp" 72 : buffer(buffer), last_sample_p(0), policy(policy) {}
87 return buffer->
size();
111 value_t *new_sample_p;
114 buffer->
Release(last_sample_p);
116 sample = *new_sample_p;
122 last_sample_p = new_sample_p;
130 sample = *(last_sample_p);
143 buffer->
Release(last_sample_p);
169 return "ChannelBufferElement";
base::BufferInterface< T >::shared_ptr buffer
virtual size_t getBufferSize() const =0
boost::call_traits< T >::param_type param_t
virtual size_t getBufferSize() const
virtual size_type capacity() const =0
virtual FlowStatus read(reference_t sample, bool copy_old_data)
virtual bool Push(param_t item)=0
virtual bool data_sample(param_t sample, bool reset=true)=0
virtual const ConnPolicy * getConnPolicy() const
virtual void Release(value_t *item)=0
virtual value_t * PopWithoutRelease()=0
virtual WriteStatus write(param_t sample)
virtual size_t getBufferFillSize() const =0
virtual size_t getNumDroppedSamples() const =0
virtual size_t getBufferFillSize() const
virtual ~ChannelBufferElementBase()
virtual size_t getNumDroppedSamples() const
base::ChannelElement< T >::value_t value_t
virtual ~ChannelBufferElement()
virtual WriteStatus data_sample(param_t sample, bool reset=true)
boost::call_traits< T >::reference reference_t
virtual value_t data_sample()
base::ChannelElement< T >::reference_t reference_t
virtual std::string getElementName() const
base::ChannelElement< T >::value_t * last_sample_p
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
virtual value_t data_sample()
ChannelBufferElement(typename base::BufferInterface< T >::shared_ptr buffer, const ConnPolicy &policy=ConnPolicy())
base::ChannelElement< T >::param_t param_t
virtual size_type dropped() const =0
virtual size_type size() const =0
boost::shared_ptr< BufferInterface< T > > shared_ptr