libzypp  15.28.6
zypp::str::Str Class Reference

Convenient building of std::string via std::ostringstream Basically a std::ostringstream autoconvertible to std::string for building string arguments. More...

#include <String.h>

Public Member Functions

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

Private Attributes

std::ostringstream _str
 

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &str, const Str &obj)
 

Detailed Description

Convenient building of std::string via std::ostringstream Basically a std::ostringstream autoconvertible to std::string for building string arguments.

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

Definition at line 210 of file String.h.

Member Function Documentation

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

Definition at line 213 of file String.h.

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

Definition at line 216 of file String.h.

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

Definition at line 219 of file String.h.

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

Definition at line 220 of file String.h.

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

Definition at line 222 of file String.h.

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

Definition at line 223 of file String.h.

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

Definition at line 225 of file String.h.

Friends And Related Function Documentation

std::ostream & operator<< ( std::ostream &  str,
const Str obj 
)
related

Stream output

Definition at line 232 of file String.h.

Member Data Documentation

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

Definition at line 228 of file String.h.


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