17 INLINE StreamWrapperBase::
82 INLINE IStreamWrapper::
83 IStreamWrapper(std::istream *stream,
bool owns_pointer) :
85 _owns_pointer(owns_pointer)
92 INLINE IStreamWrapper::
93 IStreamWrapper(std::istream &stream) :
102 INLINE std::istream *IStreamWrapper::
103 get_istream()
const {
114 result = _istream->get();
123 INLINE OStreamWrapper::
124 OStreamWrapper(std::ostream *stream,
bool owns_pointer,
bool stringstream_hack) :
126 _owns_pointer(owns_pointer)
128 , _stringstream_hack(stringstream_hack)
136 INLINE OStreamWrapper::
137 OStreamWrapper(std::ostream &stream) :
141 , _stringstream_hack(false)
149 INLINE std::ostream *OStreamWrapper::
150 get_ostream()
const {
163 success = !_ostream->bad();
171 INLINE StreamWrapper::
172 StreamWrapper(std::iostream *stream,
bool owns_pointer,
bool stringstream_hack) :
176 _owns_pointer(owns_pointer)
183 INLINE StreamWrapper::
184 StreamWrapper(std::iostream &stream) :
195 INLINE std::iostream *StreamWrapper::
196 get_iostream()
const {
static void inc(Integer &var)
Atomically increments the indicated variable.
static bool dec(Integer &var)
Atomically decrements the indicated variable and returns true if the new value is nonzero,...
int get()
Atomically reads a single character from the stream.
void release()
Releases the internal lock.
This class provides a locking wrapper around an arbitrary istream pointer.
bool put(char c)
Atomically writes a single character to the stream.
void acquire()
Acquires the internal lock.
void ref() const
Increments the reference count.
This class provides a locking wrapper around an arbitrary ostream pointer.
bool unref() const
Decrements the reference count.