Apache Qpid C++ API
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

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>

List of all members.

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 40 of file Msg.h.


Constructor & Destructor Documentation

qpid::Msg::Msg (  )  [inline]

Definition at line 42 of file Msg.h.

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

Definition at line 43 of file Msg.h.


Member Function Documentation

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

Definition at line 45 of file Msg.h.

References str().

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

Definition at line 62 of file Msg.h.

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

Definition at line 60 of file Msg.h.

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

Definition at line 59 of file Msg.h.

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

Definition at line 58 of file Msg.h.

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

Definition at line 53 of file Msg.h.

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

Definition at line 52 of file Msg.h.

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

Definition at line 51 of file Msg.h.

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

Definition at line 50 of file Msg.h.

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

Definition at line 49 of file Msg.h.

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

Definition at line 48 of file Msg.h.

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

Definition at line 47 of file Msg.h.

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

Definition at line 44 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 41 of file Msg.h.

Referenced by str().


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

Qpid C++ API Reference
Generated on Mon Jun 7 17:49:08 2010 for Qpid C++ Client API by doxygen 1.6.2-20100208