class
#include <robometry/Buffer.h>
Buffer A class to represent the buffer of robometry::
Public types
- using iterator = typename boost::circular_buffer<Record>::iterator
- using const_iterator = typename boost::circular_buffer<Record>::const_iterator
Constructors, destructors, conversion operators
- Buffer() defaulted
- Buffer(const Buffer& _other) defaulted
- Construct a new Buffer object copying from another Buffer.
- Buffer(Buffer&& _other) defaulted noexcept
- Construct a new Buffer object moving from another Buffer.
- ~Buffer() defaulted virtual
- Destroy the Buffer object.
- Buffer(size_t num_elements)
- Construct a new Buffer object.
Public functions
- auto operator=(const Buffer& _other) -> Buffer& defaulted
- Copy assignment operator.
- auto operator=(Buffer&& _other) -> Buffer& defaulted noexcept
- Move assignment operator.
- void push_back(const Record& elem)
- Push back copying the new Record.
- void push_back(Record&& elem)
- Push back moving the new Record.
- auto getBufferFreeSpace() const -> size_t
- Get the Buffer free space.
- auto size() const -> size_t
- Get the size of the Buffer.
- auto capacity() const -> size_t
- Get the capacity of Buffer.
- auto empty() const -> bool
- Return true if the Buffer is empty, false otherwise.
- void resize(size_t new_size)
- Resize the Buffer.
- void set_capacity(size_t new_size)
- Change the capacity of the Buffer.
- auto full() const -> bool
- Return true if the Buffer is full, false otherwise.
- auto begin() -> iterator noexcept
- Return the iterator referred to the begin of the Buffer.
- auto end() -> iterator noexcept
- Return the iterator referred to the end of the Buffer.
- auto begin() const -> const_iterator noexcept
- Return the const iterator referred to the begin of the Buffer.
- auto end() const -> const_iterator noexcept
- Return the const iterator referred to the end of the Buffer.
- void clear() noexcept
- Clear the content of the buffer.
- auto getBufferSharedPtr() const -> std::shared_ptr<boost::circular_buffer<Record>>
- Get the Buffer shared_ptr object.
Function documentation
size_t robometry:: Buffer:: getBufferFreeSpace() const
Get the Buffer free space.
Returns | size_t The free space expressed in bytes. |
---|
void robometry:: Buffer:: set_capacity(size_t new_size)
Change the capacity of the Buffer.
Parameters | |
---|---|
new_size in | The new size. |
std::shared_ptr<boost::circular_buffer<Record>> robometry:: Buffer:: getBufferSharedPtr() const
Get the Buffer shared_ptr object.
Returns | std::shared_ptr<boost::circular_buffer<Record>> |
---|