|
| memory_stream (size_t max_length=(static_cast< size_t >(1L)<< 36)) |
|
| memory_stream (size_t n, unsigned char const *buf) |
| Set up a stream based on an external input buffer.
|
|
| memory_stream (std::vector< unsigned char > &buf) |
| Set up a stream based on an external output buffer.
|
|
size_t | length () const |
| Length of the buffer.
|
|
unsigned char * | output_buffer () |
| Output buffer.
|
|
unsigned char * | output_location () |
| Next location to write to.
|
|
unsigned char const * | input_buffer () const |
| Input buffer.
|
|
unsigned char const * | input_location () const |
| Next location to read from.
|
|
| operator bool () const |
| Cast operator to be used to test for errors.
|
|
template<typename T > |
void | write_object (T const &t) |
| Write a simple object to the output buffer.
|
|
template<typename T > |
void | write_vector (std::vector< T > const &t) |
| Write a vector of simple objects to the output buffer.
|
|
template<typename T > |
void | read_object (T &t) |
| Read a simple object from the buffer.
|
|
template<typename T > |
void | read_vector (std::vector< T > &t) |
| Read a vector of simple objects from the buffer.
|
|
size_t | tellg () const |
| Report the current position in the buffer.
|
|
memory_stream & | seekg (size_t pos) |
| Report the current position in the buffer.
|
|
void | setf (decltype(std::ios::fmtflags(0)), decltype(std::ios::floatfield)) |
| Ignore formatting operators.
|
|
void | setf (decltype(std::ios::fmtflags(0))) |
| Ignore formatting operators.
|
|
void | flags (decltype(std::ios::fmtflags(0))) |
| Ignore formatting operators.
|
|
decltype(std::ios::fmtflags(0)) | flags () const |
| Get the current formatting flags (i.e. none because this stream is unformatted)
|
|
std::ios::iostate | rdstate () const |
| Get the error code.
|
|
void | setstate (std::ios::iostate new_state) |
| Set the error code.
|
|
void | clear () |
| Clear the error code.
|
|
template<> |
void | write_object (std::string const &t) |
|
template<> |
void | write_object (colvarvalue const &t) |
|
template<> |
void | write_object (cvm::vector1d< cvm::real > const &t) |
|
template<> |
void | read_object (std::string &t) |
|
template<> |
void | read_object (colvarvalue &t) |
|
template<> |
void | read_object (cvm::vector1d< cvm::real > &t) |
|
|
std::vector< unsigned char > * | external_output_buffer_ = nullptr |
| External output buffer.
|
|
unsigned char const * | external_input_buffer_ = nullptr |
| External input buffer.
|
|
std::vector< unsigned char > | internal_buffer_ |
| Internal buffer (may server for both input and output)
|
|
size_t | data_length_ = 0L |
| Length of the data buffer (either internal or external)
|
|
size_t const | max_length_ |
| Largest allowed capacity of the data buffer.
|
|
std::ios::iostate | state_ = std::ios::goodbit |
| Error status.
|
|
size_t | read_pos_ = 0L |
| Current position when reading from the buffer.
|
|