AMPS C/C++ Client Class Reference AMPS C/C++ Client Version 5.3.5.6

Public Member Functions | List of all members
AMPS::MessageImpl Class Reference

Implementation class for a Message. More...

`#include <Message.hpp>`

Inherits RefBody.

## Public Member Functions
| MessageImpl (amps_handle message_, bool owner_=false, bool ignoreAutoAck_=false, size_t bookmarkSeqNo_=0, amps_subscription_handle subscription_=NULL, ClientImpl *clientImpl_=NULL)
| Constructs a messageImpl from an existing AMPS message. More...
| MessageImpl ()
| Constructs a MessageImpl with a new, empty AMPS message.
amps_handle | getMessage () const
| Returns the underling AMPS message object from the C layer.
void | replace (amps_handle message_, bool owner_=false)
| Causes self to refer to a new AMPS message, freeing any current message owned by self along the way. More...

## Detailed Description

Implementation class for a Message.

Holds an amps_handle with the real body and storage for the message.

## Constructor & Destructor Documentation

## ◆ MessageImpl()

AMPS::MessageImpl::MessageImpl | ( | amps_handle | message_,
|  | bool | owner_ = `false`,
|  | bool | ignoreAutoAck_ = `false`,
|  | size_t | bookmarkSeqNo_ = `0`,
|  | amps_subscription_handle | subscription_ = `NULL`,
|  | ClientImpl * | clientImpl_ = `NULL`
| ) |  |
| inline

Constructs a messageImpl from an existing AMPS message.

The owner flag tells us if we own the message and should destroy it when done or not.

Parameters

  message_ | The AMPS message to use.
  owner_ | If we own the memory of the message_.
  ignoreAutoAck_ | If we own the memory of the message_.
  bookmarkSeqNo_ | The sequence number in the bookmark store.
  subscription_ | The handle of the subscription where message was logged.
  clientImpl_ | The client creating the message, used for automatic queue acking.

## Member Function Documentation

## ◆ replace()

void AMPS::MessageImpl::replace | ( | amps_handle | message_,
|  | bool | owner_ = `false`
| ) |  |
| inline

Causes self to refer to a new AMPS message, freeing any current message owned by self along the way.

Parameters

  message_ | The new AMPS message to use.
  owner_ | If this MessageImpl owns the memory of message_.

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

- include/amps/Message.hpp