Scopira 20080306

scopira::tool::stringflow Class Reference

#include <stringflow.h>

Inheritance diagram for scopira::tool::stringflow:
scopira::tool::iflow_i scopira::tool::oflow_i scopira::tool::flow_i scopira::tool::flow_i scopira::tool::object scopira::tool::object

List of all members.

Public Types

enum  { append_c = 1024, trunc_c = 2048 }

access levels

Public Member Functions

 stringflow (void)
 default, open for output with the given reserve
 stringflow (size_t res)
 default, open for output with the given reserve
 stringflow (const std::string &data, mode_t mode)
 opening constructor
virtual ~stringflow ()
virtual bool failed (void) const
 are we in a failed state?
virtual size_t read (byte_t *_buf, size_t _maxsize)
 read raw block data, returns num read in
virtual size_t write (const byte_t *_buf, size_t _size)
 write a raw block of data
void open (void)
 open for writing. uses truncation
void open (const std::string &data, mode_t mode)
 opens a file
void close (void)
 close the file
void reserve (size_t _size)
 reserve an internal buffer
const std::string & str (void) const
 get the current string contents

Protected Attributes

mode_t dm_mode
 current modes, 0 for no-file
std::string dm_data
 the data string
size_t dm_index
 the current index

Detailed Description

A flow-sink that reads/writes data to a in-memory STL string.

Aleksander Demko

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