libzypp  15.3.0
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)
 
 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 233 of file String.h.

Member Function Documentation

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

Definition at line 236 of file String.h.

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

Definition at line 239 of file String.h.

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

Definition at line 242 of file String.h.

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

Definition at line 245 of file String.h.

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

Definition at line 248 of file String.h.

Member Data Documentation

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

Definition at line 251 of file String.h.


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