25#ifndef __BITPIT_COMMUNICATIONS_BUFFERS_TPP__
26#define __BITPIT_COMMUNICATIONS_BUFFERS_TPP__
63template<
typename RawBufferType>
67 m_buffers.emplace_back(size);
69 m_buffers.emplace_back(size);
73 m_front = &m_buffers[doubleBuffer ? 1 : 0];
74 m_back = &m_buffers[0];
82template<
typename RawBufferType>
93template<
typename RawBufferType>
96 for (RawBufferType & buffer : m_buffers) {
107template<
typename RawBufferType>
110 return m_front->seekg(pos);
118template<
typename RawBufferType>
121 return m_front->tellg();
129template<
typename RawBufferType>
132 return (m_buffers.size() == 2);
140template<
typename RawBufferType>
151template<
typename RawBufferType>
160template<
typename RawBufferType>
163 std::swap(m_front, m_back);
169template<
typename RawBufferType>
178template<
typename RawBufferType>
void setSize(size_t size)
RawBufferType & getFront()
std::ifstream::pos_type tellg(void) const
RawBufferType & getBack()
CommunicationBuffer(size_t size=0, bool doubleBuffer=false)
std::vector< RawBufferType > & getBuffers()
Buffer to be used for receive communications.
Buffer to be used for send communications.
Logger & operator<<(Logger &logger, LoggerManipulator< T > &&m)