qpid::Msg Struct Reference

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

- Main Page
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Public Attributes
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
Msg & | operator<< (long n)
Msg & | operator<< (unsigned long n)
Msg & | operator<< (bool n)
Msg & | operator<< (short n)
Msg & | operator<< (unsigned short n)
Msg & | operator<< (int n)
Msg & | operator<< (unsigned int n)
Msg & | operator<< (double n)
Msg & | operator<< (float n)
Msg & | operator<< (long double n)
template<class T >
Msg & | operator<< (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()

## 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().

## Member Data Documentation

std::ostringstream qpid::Msg::os

Definition at line 42 of file Msg.h.

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

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

- qpid/Msg.h