6#ifndef YARP_DEV_IMPL_FIXEDSIZEBUFFERSMANAGER_H
7#define YARP_DEV_IMPL_FIXEDSIZEBUFFERSMANAGER_H
62 void setValue(uint32_t index, T value);
131 std::vector<T*> m_buffers;
132 std::vector<bool> m_usedBuffers;
133 std::size_t m_numElem;
134 uint32_t m_firstFreeBuff;
Buffer contains info about a buffer of type T and it is used to exchange information with yarp::dev::...
T * getData()
Return the data pointer.
~Buffer()
Destructor.Note that the memory will not deallocated.
T & operator[](uint32_t index)
Access specified element.
T getValue(uint32_t index)
Return the value contained in the buffer at index index.
uint32_t getSize()
Return the number of element of buffer.
void setValue(uint32_t index, T value)
Set the value @value in the buffer at index index.
A manager of fixed size buffers in multi-thread environment.
void printBuffers()
Prints info of buffers.
std::size_t getBufferSize()
Get the number of elements of a buffer.
Buffer< T > getBuffer()
Get a buffer and fill its information in @buffer.
void releaseBuffer(Buffer< T > &buffer)
Release a buffer.
~FixedSizeBuffersManager()
Destructor.