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 () |
Buffer to be used for data communications.
RawBufferType | is the type of raw buffer that will be used |
Definition at line 60 of file communications_buffers.hpp.
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.
|
protected |
Get the back buffer
Definition at line 152 of file communications_buffers.tpp.
|
protected |
Get a reference to the raw buffers
Definition at line 170 of file communications_buffers.tpp.
|
protected |
Get a constant reference to the raw buffers
Definition at line 179 of file communications_buffers.tpp.
|
protected |
Get the front buffer
Definition at line 141 of file communications_buffers.tpp.
size_t bitpit::CommunicationBuffer< RawBufferType >::getSize | ( | ) | const |
Get the size of the buffer
Definition at line 83 of file communications_buffers.tpp.
bool bitpit::CommunicationBuffer< RawBufferType >::isDouble | ( | ) | const |
Checks if the buffer is a double buffer.
Definition at line 130 of file communications_buffers.tpp.
bool bitpit::CommunicationBuffer< RawBufferType >::seekg | ( | size_t | pos | ) |
Set cursor position within the front buffer
pos | is the new cursor position |
Definition at line 108 of file communications_buffers.tpp.
void bitpit::CommunicationBuffer< RawBufferType >::setSize | ( | size_t | size | ) |
Set the size of the buffer
size | is the size of the buffer |
Definition at line 94 of file communications_buffers.tpp.
|
protected |
Swap front and back buffers.
Definition at line 161 of file communications_buffers.tpp.
std::ifstream::pos_type bitpit::CommunicationBuffer< RawBufferType >::tellg | ( | void | ) | const |
Get cursor position within the front buffer
Definition at line 119 of file communications_buffers.tpp.