15 #ifndef STREAMWRAPPER_H 16 #define STREAMWRAPPER_H 18 #include "dtoolbase.h" 19 #include "mutexImpl.h" 32 INLINE
void acquire();
33 INLINE
void release();
57 INLINE IStreamWrapper(istream &stream);
60 INLINE istream *get_istream()
const;
63 void read(
char *buffer, streamsize num_bytes);
64 void read(
char *buffer, streamsize num_bytes, streamsize &read_bytes);
65 void read(
char *buffer, streamsize num_bytes, streamsize &read_bytes,
bool &eof);
66 void seek_read(streamsize pos,
char *buffer, streamsize num_bytes, streamsize &read_bytes,
bool &eof);
68 streamsize seek_gpos_eof();
83 INLINE
OStreamWrapper(ostream *stream,
bool owns_pointer,
bool stringstream_hack =
false);
85 INLINE OStreamWrapper(ostream &stream);
88 INLINE ostream *get_ostream()
const;
91 void write(
const char *buffer, streamsize num_bytes);
92 void write(
const char *buffer, streamsize num_bytes,
bool &fail);
93 void seek_write(streamsize pos,
const char *buffer, streamsize num_bytes,
bool &fail);
94 void seek_eof_write(
const char *buffer, streamsize num_bytes,
bool &fail);
95 INLINE
bool put(
char c);
96 streamsize seek_ppos_eof();
109 bool _stringstream_hack;
120 INLINE
StreamWrapper(iostream *stream,
bool owns_pointer,
bool stringstream_hack =
false);
122 INLINE StreamWrapper(iostream &stream);
125 INLINE iostream *get_iostream()
const;
132 #include "streamWrapper.I" This class provides a locking wrapper around a combination ostream/istream pointer.
This class provides a locking wrapper around an arbitrary istream pointer.
A fake mutex implementation for single-threaded applications that don't need any synchronization cont...
This class provides a locking wrapper around an arbitrary ostream pointer.
The base class for both IStreamWrapper and OStreamWrapper, this provides the common locking interface...