12 #ifndef ZYPP_BASE_IOSTREAM_H
13 #define ZYPP_BASE_IOSTREAM_H
16 #include <boost/io/ios_state.hpp>
46 std::string
getline( std::istream & str );
51 inline std::ostream &
copy( std::istream & from_r, std::ostream & to_r )
56 while ( from_r && from_r.get( ch ) )
65 inline std::ostream &
copyIndent( std::istream & from_r, std::ostream & to_r,
const std::string & indent_r =
"> " )
71 while ( from_r && from_r.get( ch ) )
75 indent = ( ch ==
'\n' );
85 inline void tee( std::istream & from_r, std::ostream & to1_r, std::ostream & to2_r )
87 if ( from_r && ( to1_r ||to2_r ) )
90 while ( from_r && from_r.get( ch ) )
118 EachLine( std::istream & str_r,
unsigned lineNo_r = 0 );
155 while ( num_r-- &&
next() )
161 friend SafeBool::operator
bool_type()
const;
192 int forEachLine( std::istream & str_r,
function<
bool(
int, std::string)> consume_r );
207 int simpleParseFile( std::istream & str_r, ParseFlags flags_r,
function<
bool(
int, std::string)> consume_r );
210 inline int simpleParseFile( std::istream & str_r,
function<
bool(
int, std::string)> consume_r )
219 #endif // ZYPP_BASE_IOSTREAM_H