12#ifndef ZYPP_BASE_IOSTREAM_H
13#define ZYPP_BASE_IOSTREAM_H
16#include <boost/io/ios_state.hpp>
75 indent = (
ch ==
'\n' );
131 {
return _lineStart; };
154 while (
num_r-- && next() )
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
Simple lineparser: Traverse each line in a file.
bool next(unsigned num_r)
Advance num_r lines.
void setLineNo(unsigned lineNo_r)
Set current line number.
std::streamoff lineStart() const
std::string & operator*()
const std::string * operator->() const
Access the current line.
unsigned lineNo() const
Return the current line number.
bool valid() const
Whether this contains a valid line to consume.
const std::string & operator*() const
Access the current line.
std::streamoff _lineStart
String related utilities and Regular expression matching.
boost::noncopyable NonCopyable
Ensure derived classes cannot be copied.
int forEachLine(std::istream &str_r, const function< bool(int, std::string)> &consume_r)
Simple lineparser: Call functor consume_r for each line.
ParseFlag
simpleParseFile modifications before consuming a line.
int simpleParseFile(std::istream &str_r, ParseFlags flags_r, function< bool(int, std::string)> consume_r)
Simple lineparser optionally trimming and skipping comments.
void tee(std::istream &from_r, std::ostream &to1_r, std::ostream &to2_r)
Copy istream to ostream, prefixing each line with indent_r (default "> " ).
std::ostream & copyIndent(std::istream &from_r, std::ostream &to_r, const std::string &indent_r="> ")
Copy istream to ostream, prefixing each line with indent_r (default "> " ).
boost::io::ios_base_all_saver IosFmtFlagsSaver
Save and restore streams width, precision and fmtflags.
std::string getline(std::istream &str)
Read one line from stream.
std::ostream & copy(std::istream &from_r, std::ostream &to_r)
Copy istream to ostream.
Easy-to use interface to the ZYPP dependency resolver.
const Arch Arch_armv7hnl Arch_armv7nhl ZYPP_API
#define ZYPP_DECLARE_OPERATORS_FOR_FLAGS(Name)
#define ZYPP_DECLARE_FLAGS(Name, Enum)