Buffer to be used for data communications. More...
#include <communications_buffers.hpp>

Public Member Functions | |
CommunicationBuffer (size_t size=0, bool doubleBuffer=false) | |
size_t | getSize () const |
bool | isDouble () const |
bool | seekg (size_t pos) |
void | setSize (size_t size) |
std::ifstream::pos_type | tellg (void) const |
Protected Member Functions | |
RawBufferType & | getBack () |
std::vector< RawBufferType > & | getBuffers () |
const std::vector< RawBufferType > & | getBuffers () const |
RawBufferType & | getFront () |
void | swap () |
Detailed Description
class bitpit::CommunicationBuffer< RawBufferType >
Buffer to be used for data communications.
- Template Parameters
-
RawBufferType is the type of raw buffer that will be used
Definition at line 60 of file communications_buffers.hpp.
Constructor & Destructor Documentation
◆ CommunicationBuffer()
bitpit::CommunicationBuffer< RawBufferType >::CommunicationBuffer | ( | size_t | size = 0, |
bool | doubleBuffer = false ) |
Create a new communication buffer
Definition at line 64 of file communications_buffers.tpp.
Member Function Documentation
◆ getBack()
|
protected |
Get the back buffer
- Returns
- The back buffer.
Definition at line 152 of file communications_buffers.tpp.
◆ getBuffers() [1/2]
|
protected |
Get a reference to the raw buffers
Definition at line 170 of file communications_buffers.tpp.
◆ getBuffers() [2/2]
|
protected |
Get a constant reference to the raw buffers
Definition at line 179 of file communications_buffers.tpp.
◆ getFront()
|
protected |
Get the front buffer
- Returns
- The front buffer.
Definition at line 141 of file communications_buffers.tpp.
◆ getSize()
size_t bitpit::CommunicationBuffer< RawBufferType >::getSize | ( | ) | const |
Get the size of the buffer
- Returns
- The size of the buffer.
Definition at line 83 of file communications_buffers.tpp.
◆ isDouble()
bool bitpit::CommunicationBuffer< RawBufferType >::isDouble | ( | ) | const |
Checks if the buffer is a double buffer.
- Returns
- Returns true if the buffer is a double buffer, false otherwise.
Definition at line 130 of file communications_buffers.tpp.
◆ seekg()
bool bitpit::CommunicationBuffer< RawBufferType >::seekg | ( | size_t | pos | ) |
Set cursor position within the front buffer
- Parameters
-
pos is the new cursor position
- Returns
- Return true if new position is valid, false otherwise
Definition at line 108 of file communications_buffers.tpp.
◆ setSize()
void bitpit::CommunicationBuffer< RawBufferType >::setSize | ( | size_t | size | ) |
Set the size of the buffer
- Parameters
-
size is the size of the buffer
Definition at line 94 of file communications_buffers.tpp.
◆ swap()
|
protected |
Swap front and back buffers.
Definition at line 161 of file communications_buffers.tpp.
◆ tellg()
std::ifstream::pos_type bitpit::CommunicationBuffer< RawBufferType >::tellg | ( | void | ) | const |
Get cursor position within the front buffer
- Returns
- Returns the cursor position.
Definition at line 119 of file communications_buffers.tpp.
The documentation for this class was generated from the following files:
- src/communications/communications_buffers.hpp
- src/communications/communications_buffers.tpp
