libzypp  13.10.6
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
 

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 193 of file String.h.

Member Function Documentation

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

Definition at line 196 of file String.h.

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

Definition at line 199 of file String.h.

Member Data Documentation

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

Definition at line 202 of file String.h.


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