libzypp  15.19.5
zypp::str::Str Struct Reference

Convenient building of std::string via std::ostream::operator<<. More...

#include <String.h>

Public Member Functions

template<class Tp >
Stroperator<< (const Tp &val)
 
Stroperator<< (std::ostream &(*iomanip)(std::ostream &))
 
 operator std::string () const
 
std::string str () const
 
std::ostream & stream ()
 
void clear ()
 

Public Attributes

std::ostringstream _str
 

Detailed Description

Convenient building of std::string via std::ostream::operator<<.

Basically this is an ostringstream which is autocenvertible into a string.

void fnc( const std::string & txt_r );
fnc( str::Str() << "Hello " << 13 );
std::string txt( str::Str() << 45 );

Definition at line 237 of file String.h.

Member Function Documentation

template<class Tp >
Str& zypp::str::Str::operator<< ( const Tp &  val)
inline

Definition at line 240 of file String.h.

Str& zypp::str::Str::operator<< ( std::ostream &(*)(std::ostream &)  iomanip)
inline

Definition at line 243 of file String.h.

zypp::str::Str::operator std::string ( ) const
inline

Definition at line 246 of file String.h.

std::string zypp::str::Str::str ( ) const
inline

Definition at line 249 of file String.h.

std::ostream& zypp::str::Str::stream ( )
inline

Definition at line 252 of file String.h.

void zypp::str::Str::clear ( )
inline

Definition at line 255 of file String.h.

Member Data Documentation

std::ostringstream zypp::str::Str::_str

Definition at line 258 of file String.h.


The documentation for this struct was generated from the following file: