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


Member Function Documentation

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

Definition at line 179 of file String.h.

References _str.

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

Definition at line 182 of file String.h.

References _str.


Member Data Documentation

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

Definition at line 185 of file String.h.

Referenced by operator std::string(), and operator<<().


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

doxygen