YARP
Yet Another Robot Platform
yarp::dev::impl::Buffer< T > Class Template Reference

Buffer contains info about a buffer of type T and it is used to exchange information with yarp::dev::impl::FixedSizeBuffersManager. More...

#include <yarp/dev/impl/FixedSizeBuffersManager.h>

Public Member Functions

 Buffer ()
 Constructor. More...
 
 ~Buffer ()
 Destructor.Note that the memory will not deallocated. More...
 
T * getData ()
 Return the data pointer. More...
 
uint32_t getSize ()
 Return the number of element of buffer. More...
 
getValue (uint32_t index)
 Return the value contained in the buffer at index index. More...
 
void setValue (uint32_t index, T value)
 Set the value @value in the buffer at index index. More...
 
T & operator[] (uint32_t index)
 Access specified element. More...
 

Public Attributes

uint32_t key
 
T * dataPtr
 
uint32_t numOfElements
 

Detailed Description

template<typename T>
class yarp::dev::impl::Buffer< T >

Buffer contains info about a buffer of type T and it is used to exchange information with yarp::dev::impl::FixedSizeBuffersManager.

Definition at line 26 of file FixedSizeBuffersManager.h.

Constructor & Destructor Documentation

◆ Buffer()

template<typename T >
yarp::dev::impl::Buffer< T >::Buffer

Constructor.

Definition at line 16 of file FixedSizeBuffersManager-inl.h.

◆ ~Buffer()

template<typename T >
yarp::dev::impl::Buffer< T >::~Buffer

Destructor.Note that the memory will not deallocated.

Definition at line 23 of file FixedSizeBuffersManager-inl.h.

Member Function Documentation

◆ getData()

template<typename T >
T * yarp::dev::impl::Buffer< T >::getData

Return the data pointer.

Definition at line 29 of file FixedSizeBuffersManager-inl.h.

◆ getSize()

template<typename T >
uint32_t yarp::dev::impl::Buffer< T >::getSize

Return the number of element of buffer.

Definition at line 36 of file FixedSizeBuffersManager-inl.h.

◆ getValue()

template<typename T >
T yarp::dev::impl::Buffer< T >::getValue ( uint32_t  index)

Return the value contained in the buffer at index index.

If index is not minor of size of buffer than a std::out_of_range is thrown.

Definition at line 43 of file FixedSizeBuffersManager-inl.h.

◆ operator[]()

template<typename T >
T & yarp::dev::impl::Buffer< T >::operator[] ( uint32_t  index)

Access specified element.

Definition at line 65 of file FixedSizeBuffersManager-inl.h.

◆ setValue()

template<typename T >
void yarp::dev::impl::Buffer< T >::setValue ( uint32_t  index,
value 
)

Set the value @value in the buffer at index index.

If index is not minor of size of buffer than a std::out_of_range is thrown.

Definition at line 54 of file FixedSizeBuffersManager-inl.h.

Member Data Documentation

◆ dataPtr

template<typename T >
T* yarp::dev::impl::Buffer< T >::dataPtr

Definition at line 30 of file FixedSizeBuffersManager.h.

◆ key

template<typename T >
uint32_t yarp::dev::impl::Buffer< T >::key

Definition at line 29 of file FixedSizeBuffersManager.h.

◆ numOfElements

template<typename T >
uint32_t yarp::dev::impl::Buffer< T >::numOfElements

Definition at line 31 of file FixedSizeBuffersManager.h.


The documentation for this class was generated from the following files: