libzypp  13.10.6
IOStream.h File Reference
#include <iosfwd>
#include <boost/io/ios_state.hpp>
#include "zypp/base/Flags.h"
#include "zypp/base/PtrTypes.h"
#include "zypp/base/Function.h"
#include "zypp/base/NonCopyable.h"

Go to the source code of this file.

Classes

class  zypp::iostr::EachLine
 Simple lineparser: Traverse each line in a file. More...
 

Namespaces

 zypp
 Easy-to use interface to the ZYPP dependency resolver.
 
 zypp::iostr
 Iostream related utilities.
 

Typedefs

typedef
boost::io::ios_base_all_saver 
zypp::iostr::IosFmtFlagsSaver
 Save and restore streams width, precision and fmtflags. More...
 

Enumerations

enum  zypp::iostr::ParseFlag {
  zypp::iostr::PF_LTRIM = 1 << 0, zypp::iostr::PF_RTRIM = 1 << 1, zypp::iostr::PF_TRIM = PF_LTRIM | PF_RTRIM, zypp::iostr::PF_SKIP_EMPTY = 1 << 2,
  zypp::iostr::PF_SKIP_SHARP_COMMENT = 1 << 3
}
 simpleParseFile modifications before consuming a line. More...
 

Functions

std::string zypp::iostr::getline (std::istream &str)
 Read one line from stream. More...
 
std::ostream & zypp::iostr::copy (std::istream &from_r, std::ostream &to_r)
 Copy istream to ostream. More...
 
std::ostream & zypp::iostr::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 "> " ). More...
 
void zypp::iostr::tee (std::istream &from_r, std::ostream &to1_r, std::ostream &to2_r)
 Copy istream to ostream, prefixing each line with indent_r (default "> " ). More...
 
int zypp::iostr::forEachLine (std::istream &str_r, function< bool(int, std::string)> consume_r)
 Simple lineparser: Call functor consume_r for each line. More...
 
 zypp::iostr::ZYPP_DECLARE_FLAGS (ParseFlags, ParseFlag)
 
 zypp::iostr::ZYPP_DECLARE_OPERATORS_FOR_FLAGS (ParseFlags)
 
int zypp::iostr::simpleParseFile (std::istream &str_r, ParseFlags flags_r, function< bool(int, std::string)> consume_r)
 Simple lineparser optionally trimming and skipping comments. More...
 
int zypp::iostr::simpleParseFile (std::istream &str_r, function< bool(int, std::string)> consume_r)