libzypp
13.10.6
|
Simple lineparser: Traverse each line in a file. More...
#include <IOStream.h>
Public Member Functions | |
EachLine (std::istream &str_r, unsigned lineNo_r=0) | |
Ctor taking a stream and reading the 1st line from it. More... | |
bool | valid () const |
Whether this contains a valid line to consume. More... | |
operator bool () const | |
Evaluate class in a boolean context. More... | |
unsigned | lineNo () const |
Return the current line number. More... | |
std::streamoff | lineStart () const |
void | setLineNo (unsigned lineNo_r) |
Set current line number. More... | |
const std::string & | operator* () const |
Access the current line. More... | |
std::string & | operator* () |
const std::string * | operator-> () const |
Access the current line. More... | |
bool | next () |
Advance to next line. More... | |
bool | next (unsigned num_r) |
Advance num_r lines. More... | |
Private Attributes | |
std::istream & | _str |
std::string | _line |
std::streamoff | _lineStart |
unsigned | _lineNo |
bool | _valid |
Simple lineparser: Traverse each line in a file.
Definition at line 111 of file IOStream.h.
zypp::iostr::EachLine::EachLine | ( | std::istream & | str_r, |
unsigned | lineNo_r = 0 |
||
) |
Ctor taking a stream and reading the 1st line from it.
Definition at line 58 of file IOStream.cc.
|
inline |
Whether this
contains a valid line to consume.
Definition at line 118 of file IOStream.h.
|
inlineexplicit |
Evaluate class in a boolean context.
Definition at line 122 of file IOStream.h.
|
inline |
Return the current line number.
Definition at line 126 of file IOStream.h.
|
inline |
Definition at line 129 of file IOStream.h.
|
inline |
Set current line number.
Definition at line 133 of file IOStream.h.
|
inline |
Access the current line.
Definition at line 137 of file IOStream.h.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 140 of file IOStream.h.
|
inline |
Access the current line.
Definition at line 144 of file IOStream.h.
bool zypp::iostr::EachLine::next | ( | ) |
Advance to next line.
Definition at line 72 of file IOStream.cc.
|
inline |
Advance num_r lines.
Definition at line 151 of file IOStream.h.
|
private |
Definition at line 159 of file IOStream.h.
|
private |
Definition at line 160 of file IOStream.h.
|
private |
Definition at line 161 of file IOStream.h.
|
private |
Definition at line 162 of file IOStream.h.
|
private |
Definition at line 163 of file IOStream.h.