Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Public Member Functions | Public Attributes | List of all members
qpid::Msg Struct Reference

A simple wrapper for std::ostringstream that allows in place construction of a message and automatic conversion to string. More...

#include <qpid/Msg.h>

Public Member Functions

 Msg ()
 
 Msg (const Msg &m)
 
std::string str () const
 
 operator std::string () const
 
Msgoperator<< (long n)
 
Msgoperator<< (unsigned long n)
 
Msgoperator<< (bool n)
 
Msgoperator<< (short n)
 
Msgoperator<< (unsigned short n)
 
Msgoperator<< (int n)
 
Msgoperator<< (unsigned int n)
 
Msgoperator<< (double n)
 
Msgoperator<< (float n)
 
Msgoperator<< (long double n)
 
template<class T >
Msgoperator<< (const T &t)
 

Public Attributes

std::ostringstream os
 

Detailed Description

A simple wrapper for std::ostringstream that allows in place construction of a message and automatic conversion to string.

E.g.

* void foo(const std::string&);
* foo(Msg() << "hello " << 32);
*

Will construct the string "hello 32" and pass it to foo()

Definition at line 41 of file Msg.h.

Constructor & Destructor Documentation

qpid::Msg::Msg ( )
inline

Definition at line 43 of file Msg.h.

qpid::Msg::Msg ( const Msg m)
inline

Definition at line 44 of file Msg.h.

Member Function Documentation

qpid::Msg::operator std::string ( ) const
inline

Definition at line 46 of file Msg.h.

References str().

Msg& qpid::Msg::operator<< ( long  n)
inline

Definition at line 48 of file Msg.h.

References os.

Msg& qpid::Msg::operator<< ( unsigned long  n)
inline

Definition at line 49 of file Msg.h.

References os.

Msg& qpid::Msg::operator<< ( bool  n)
inline

Definition at line 50 of file Msg.h.

References os.

Msg& qpid::Msg::operator<< ( short  n)
inline

Definition at line 51 of file Msg.h.

References os.

Msg& qpid::Msg::operator<< ( unsigned short  n)
inline

Definition at line 52 of file Msg.h.

References os.

Msg& qpid::Msg::operator<< ( int  n)
inline

Definition at line 53 of file Msg.h.

References os.

Msg& qpid::Msg::operator<< ( unsigned int  n)
inline

Definition at line 54 of file Msg.h.

References os.

Msg& qpid::Msg::operator<< ( double  n)
inline

Definition at line 59 of file Msg.h.

References os.

Msg& qpid::Msg::operator<< ( float  n)
inline

Definition at line 60 of file Msg.h.

References os.

Msg& qpid::Msg::operator<< ( long double  n)
inline

Definition at line 61 of file Msg.h.

References os.

template<class T >
Msg& qpid::Msg::operator<< ( const T &  t)
inline

Definition at line 63 of file Msg.h.

References os.

std::string qpid::Msg::str ( ) const
inline

Definition at line 45 of file Msg.h.

References os.

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

Member Data Documentation

std::ostringstream qpid::Msg::os

Definition at line 42 of file Msg.h.

Referenced by operator<<(), and str().


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

Qpid C++ API Reference
Generated on Thu Mar 31 2016 for Qpid C++ Client API by doxygen 1.8.5