NCBI C++ ToolKit
Public Member Functions | Private Attributes | List of all members
CRWStream Class Reference

Search Toolkit Book for CRWStream

Reader-writer based input-output stream. More...

#include <corelib/rwstream.hpp>

+ Inheritance diagram for CRWStream:
+ Collaboration diagram for CRWStream:

Public Member Functions

 CRWStream (IReaderWriter *rw, streamsize buf_size=0, CT_CHAR_TYPE *buf=0, CRWStreambuf::TFlags stm_flags=0)
 
 CRWStream (IReader *r, IWriter *w, streamsize buf_size=0, CT_CHAR_TYPE *buf=0, CRWStreambuf::TFlags stm_flags=0)
 

Private Attributes

CRWStreambuf m_Sb
 

Detailed Description

Reader-writer based input-output stream.

See also
IReaderWriter, IReader, IWriter
Parameters
buf_sizespecifies the number of bytes for internal I/O buffer, half of which is to be used for reading and the other half – for writing, by the underlying stream buffer object CRWStreambuf; 0 causes to create a buffer of some default size.
bufmay specify the buffer location (if 0, an internal storage gets allocated and later freed upon stream destruction).
stm_flagscontrols whether IReaderWriter is destroyed upon stream destruction, whether exceptions get logged (or leaked, or caught silently), etc.

Special case of "buf_size" == 1 creates an unbuffered stream ("buf", if provided, may still be used internally as a one-char un-get location).

See also
CRWStreambuf::TFlags, IRStream, IWStream

Definition at line 207 of file rwstream.hpp.

Constructor & Destructor Documentation

CRWStream::CRWStream ( IReaderWriter rw,
streamsize  buf_size = 0,
CT_CHAR_TYPE buf = 0,
CRWStreambuf::TFlags  stm_flags = 0 
)
inline

Definition at line 210 of file rwstream.hpp.

References init(), and m_Sb.

CRWStream::CRWStream ( IReader r,
IWriter w,
streamsize  buf_size = 0,
CT_CHAR_TYPE buf = 0,
CRWStreambuf::TFlags  stm_flags = 0 
)
inline

Definition at line 219 of file rwstream.hpp.

References init(), and m_Sb.

Member Data Documentation

CRWStreambuf CRWStream::m_Sb
private

Definition at line 230 of file rwstream.hpp.

Referenced by CRWStream().


The documentation for this class was generated from the following file:
Modified on Sun May 27 14:44:04 2018 by modify_doxy.py rev. 546573