Buffer to be used for send communications. More...
Public Member Functions | |
SendBuffer (size_t size=0, bool doubleBuffer=false) | |
void | squeeze () |
void | write (const char *data, std::size_t size) |
Public Member Functions inherited from bitpit::CommunicationBuffer< RawSendBuffer > | |
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 |
Friends | |
template<typename T > | |
SendBuffer & | operator<<) (SendBuffer &buffer, const T &value) |
Additional Inherited Members | |
Protected Member Functions inherited from bitpit::CommunicationBuffer< RawSendBuffer > | |
RawSendBuffer & | getBack () |
std::vector< RawSendBuffer > & | getBuffers () |
const std::vector< RawSendBuffer > & | getBuffers () const |
RawSendBuffer & | getFront () |
void | swap () |
Buffer to be used for send communications.
Definition at line 90 of file communications_buffers.hpp.
bitpit::SendBuffer::SendBuffer | ( | size_t | size = 0, |
bool | doubleBuffer = false ) |
Creates a new send buffer
Definition at line 39 of file communications_buffers.cpp.
void bitpit::SendBuffer::squeeze | ( | ) |
Requests the buffer to reduce its size to fit the data currently contained in the stream.
Definition at line 48 of file communications_buffers.cpp.
void bitpit::SendBuffer::write | ( | const char * | data, |
std::size_t | size ) |
Write data into the buffer.
[in] | data | is the memory that contain the data |
[in] | size | is the size (in bytes) of the data to be written into the stream |
Definition at line 62 of file communications_buffers.cpp.