#include <IOStream.h>
Inheritance diagram for zypp::iostr::EachLine:

Public Member Functions | |
| EachLine (std::istream &str_r, unsigned lineNo_r=0) | |
| Ctor taking a stream and reading the 1st line from it. | |
| bool | valid () const |
Whether this contains a valid line to consume. | |
| unsigned | lineNo () const |
| Return the current line number. | |
| std::streamoff | lineStart () const |
| void | setLineNo (unsigned lineNo_r) |
| Set current line number. | |
| const std::string & | operator * () const |
| Access the current line. | |
| bool | next () |
| Advance to next line. | |
| bool | next (unsigned num_r) |
| Advance num_r lines. | |
Private Types | |
| typedef base::SafeBool< EachLine > | SafeBool |
Private Member Functions | |
| friend | SafeBool::operator bool_type () const |
| bool | boolTest () const |
Private Attributes | |
| std::istream & | _str |
| std::string | _line |
| std::streamoff | _lineStart |
| unsigned | _lineNo |
| bool | _valid |
std::ifstream infile( "somefile" ); for( iostr::EachLine in( infile ); in; in.next() ) { DBG << *in << endl; }
Definition at line 60 of file IOStream.h.
|
|
Definition at line 62 of file IOStream.h. |
|
||||||||||||
|
Ctor taking a stream and reading the 1st line from it.
Definition at line 56 of file IOStream.cc. References next(). |
|
|
Whether
Definition at line 72 of file IOStream.h. References boolTest(). Referenced by next(). |
|
|
Return the current line number.
Definition at line 76 of file IOStream.h. References _lineNo. |
|
|
Definition at line 79 of file IOStream.h. References _lineStart. |
|
|
Set current line number.
Definition at line 83 of file IOStream.h. References _lineNo. |
|
|
Access the current line.
Definition at line 87 of file IOStream.h. References _line. |
|
|
Advance to next line.
Definition at line 70 of file IOStream.cc. References _line, _lineNo, _lineStart, _str, _valid, and zypp::iostr::getline(). Referenced by EachLine(), next(), and zypp::parser::IniParser::parse(). |
|
|
Advance num_r lines.
Definition at line 94 of file IOStream.h. |
|
|
|
|
|
Definition at line 103 of file IOStream.h. References _valid. Referenced by valid(). |
|
|
Definition at line 107 of file IOStream.h. Referenced by next(). |
|
|
Definition at line 108 of file IOStream.h. Referenced by next(), and operator *(). |
|
|
Definition at line 109 of file IOStream.h. Referenced by lineStart(), and next(). |
|
|
Definition at line 110 of file IOStream.h. Referenced by lineNo(), next(), and setLineNo(). |
|
|
Definition at line 111 of file IOStream.h. Referenced by boolTest(), and next(). |
1.4.6