#include <istream_wrapper.hh>
Inheritance diagram for lestes::std::istream_wrapper:

Public Types | |
| typedef ::std::istream * | stream_type |
Public Member Functions | |
| virtual | ~istream_wrapper (void) |
| Finalizes the object. | |
| void | release (void) |
| Releases the stream. | |
| stream_type | stream_get (void) const |
| Returns underlying stream. | |
| bool | owned_get (void) const |
| Returns the ownership flag. | |
Static Public Member Functions | |
| static ptr< istream_wrapper > | create (stream_type a_stream, bool a_owned) |
| Returns the wrapper. | |
Protected Member Functions | |
| istream_wrapper (stream_type a_stream, bool owned) | |
| Creates the wrapper. | |
Private Member Functions | |
| istream_wrapper (const istream_wrapper &) | |
| Hides copy constructor. | |
| istream_wrapper & | operator= (const istream_wrapper &) |
| Hides assignment operator. | |
Private Attributes | |
| stream_type | stream |
| The wrapped istream. | |
| bool | owned |
| Ownership flag. | |
Represents output stream wrapper, with ownership policy of the stream.
Definition at line 48 of file istream_wrapper.hh.
| typedef ::std::istream* lestes::std::istream_wrapper::stream_type |
Definition at line 50 of file istream_wrapper.hh.
| lestes::std::istream_wrapper::~istream_wrapper | ( | void | ) | [virtual] |
| lestes::std::istream_wrapper::istream_wrapper | ( | stream_type | a_stream, | |
| bool | a_owned | |||
| ) | [protected] |
| lestes::std::istream_wrapper::istream_wrapper | ( | const istream_wrapper & | ) | [private] |
Hides copy constructor.
| void lestes::std::istream_wrapper::release | ( | void | ) |
Releases the stream.
Releases the stream if it was owned.
Definition at line 68 of file istream_wrapper.cc.
Referenced by ~istream_wrapper().
| istream_wrapper::stream_type lestes::std::istream_wrapper::stream_get | ( | void | ) | const |
Returns underlying stream.
Returns the wrapped stream.
Definition at line 89 of file istream_wrapper.cc.
References lassert2, and stream.
00090 { 00091 lassert2(stream,"The stream is invalid because release() was already called."); 00092 return stream; 00093 }
| bool lestes::std::istream_wrapper::owned_get | ( | void | ) | const |
Returns the ownership flag.
Returns the ownership.
Definition at line 79 of file istream_wrapper.cc.
References owned.
00080 { 00081 return owned; 00082 }
| ptr< istream_wrapper > lestes::std::istream_wrapper::create | ( | stream_type | a_stream, | |
| bool | a_owned | |||
| ) | [static] |
Returns the wrapper.
Creates the wrapper.
a_stream is allocated via new when a_owned is true
| a_stream | The stream to wrap. | |
| a_owned | The ownership flag. |
Definition at line 103 of file istream_wrapper.cc.
References istream_wrapper().
00104 { 00105 return new istream_wrapper(a_stream,a_owned); 00106 }
| istream_wrapper& lestes::std::istream_wrapper::operator= | ( | const istream_wrapper & | ) | [private] |
Hides assignment operator.
The wrapped istream.
Definition at line 66 of file istream_wrapper.hh.
Referenced by release(), and stream_get().
bool lestes::std::istream_wrapper::owned [private] |
Ownership flag.
Definition at line 68 of file istream_wrapper.hh.
Referenced by owned_get(), and release().
1.5.1-20070107