#include "CTBlineStream.hxx"
Collaboration diagram for CTBlineStream:
Public Methods | |
CTBlineStream () | |
~CTBlineStream () | |
bool | Open (const char *c_name) |
void | Attach (istream *p_is) |
void | Close () |
bool | Get (CTBstring &line) |
bool | Get (const char *&c_line) |
bool | Unget () |
operator bool () | |
CTBlineStream & | operator>> (CTBstring &line) |
CTBlineStream & | operator>> (const char *&c_line) |
Private Methods | |
bool | Get () |
Private Attributes | |
istream * | mp_is |
bool | mb_attached |
bool | mb_valid_line |
bool | mb_reread_line |
CTBstring | m_line |
A CTBlineStream
object implements line oriented access to an input stream.
Definition at line 18 of file CTBlineStream.hxx.
|
Constructor.
Creates a disconnected line stream. One has to use Definition at line 35 of file CTBlineStream.cxx. |
|
Destructor.
Uses Definition at line 48 of file CTBlineStream.cxx. |
|
Open an input file.
Creates a new input stream and tries to open the file c_name. However, if the file name c_name equals "-", an Definition at line 61 of file CTBlineStream.cxx. |
|
Attach to an input stream.
This method stores a pointer to the input stream referred by p_is in the object and causes all future Definition at line 92 of file CTBlineStream.cxx. Referenced by Open().
|
|
Close a line stream.
An stream connected with Definition at line 111 of file CTBlineStream.cxx. Referenced by Attach(), Open(), and ~CTBlineStream().
|
|
Get next line into a CTBstring. Gets the next line and returns it in line. Returns true if this succeded. Definition at line 131 of file CTBlineStream.cxx. |
|
Get next line, return char* pointer. Gets the next line and returns a pointer to an internally stored copy of the string to c_line. Returns true if this succeded. Definition at line 146 of file CTBlineStream.cxx. |
|
Unget last read line.
Note, that only one line can be ungotten, that means between two calls of Definition at line 166 of file CTBlineStream.cxx. |
|
Convert to bool. Returns true if the stream is connected and in good state. Definition at line 20 of file CTBlineStream.icc. |
|
Gets next line into line.
Definition at line 28 of file CTBlineStream.icc. |
|
Gets next line. Gets the next line and returns a pointer to an internally stored copy of the string to c_line. Definition at line 41 of file CTBlineStream.icc. |
|
Definition at line 176 of file CTBlineStream.cxx. Referenced by Get(), and operator>>().
|
|
Definition at line 43 of file CTBlineStream.hxx. |
|
Definition at line 44 of file CTBlineStream.hxx. |
|
Definition at line 45 of file CTBlineStream.hxx. |
|
Definition at line 46 of file CTBlineStream.hxx. |
|
Definition at line 47 of file CTBlineStream.hxx. |