libzypp  11.13.5
zypp::str::Str Struct Reference

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

#include <String.h>

List of all members.

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


Member Function Documentation

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

Definition at line 180 of file String.h.

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

Definition at line 183 of file String.h.


Member Data Documentation

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

Definition at line 186 of file String.h.


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