scclib
Stable Cloud Computing C++ Library
Public Member Functions | List of all members
scc::util::RwLoopBuffer Class Reference

Loopback read/write stream buffer. More...

#include <rwloopbuf.h>

Inheritance diagram for scc::util::RwLoopBuffer:
Inheritance graph
[legend]
Collaboration diagram for scc::util::RwLoopBuffer:
Collaboration graph
[legend]

Public Member Functions

 RwLoopBuffer ()
 rw loop buffer
 
size_t idx () const
 
 RwLoopBuffer (const std::string &b)
 Create as a string.
 
 RwLoopBuffer (const std::vector< char > &v)
 Create as a vector.
 
RwLoopBufferoperator= (const std::string &b)
 Set to a string.
 
void clear ()
 Empty and reset.
 
void set (const void *loc, size_t len)
 Clear and set for reading.
 
void set (const std::vector< char > &v)
 Clear and set for reading.
 
void set (const std::string &v)
 Clear and set for reading.
 
size_t read (void *loc, size_t len)
 Reader read.
 
size_t const read_loc ()
 Return the current read location.
 
size_t write (const void *loc, size_t len)
 Writer write.
 
size_t const write_loc ()
 Return the current write location.
 
std::string str ()
 Read as a string.
 
std::vector< char > vec () const
 Read as a vector.
 

Detailed Description

Loopback read/write stream buffer.

Examples
util/unittest/iohelper.cc, and util/unittest/iostream.cc.

Definition at line 56 of file rwloopbuf.h.


The documentation for this class was generated from the following files: