pn_atom_t Struct Reference
Data

A descriminated union that holds any scalar AMQP value. More...

`#include <codec.h>`

## Data Fields

pn_type_t | type
| Indicates the type of value the atom is currently pointing to. More...
union {
bool as_bool
| Valid when type is PN_BOOL. More...
uint8_t as_ubyte
| Valid when type is PN_UBYTE. More...
int8_t as_byte
| Valid when type is PN_BYTE. More...
uint16_t as_ushort
| Valid when type is PN_USHORT. More...
int16_t as_short
| Valid when type is PN_SHORT. More...
uint32_t as_uint
| Valid when type is PN_UINT. More...
int32_t as_int
| Valid when type is PN_INT. More...
pn_char_t as_char
| Valid when type is PN_CHAR. More...
uint64_t as_ulong
| Valid when type is PN_ULONG. More...
int64_t as_long
| Valid when type is PN_LONG. More...
pn_timestamp_t as_timestamp
| Valid when type is PN_TIMESTAMP. More...
float as_float
| Valid when type is PN_FLOAT. More...
double as_double
| Valid when type is PN_DOUBLE. More...
pn_decimal32_t as_decimal32
| Valid when type is PN_DECIMAL32. More...
pn_decimal64_t as_decimal64
| Valid when type is PN_DECIMAL64. More...
pn_decimal128_t as_decimal128
| Valid when type is PN_DECIMAL128. More...
pn_uuid_t as_uuid
| Valid when type is PN_UUID. More...
pn_bytes_t as_bytes
| Valid when type is PN_BINARY or PN_STRING or PN_SYMBOL. More...
} | u

## Detailed Description

A descriminated union that holds any scalar AMQP value.

The type field indicates the AMQP type of the value, and the union may be used to access the value for a given type.

## Field Documentation

## as_bool

bool pn_atom_t::as_bool

Valid when type is PN_BOOL.

## as_byte

int8_t pn_atom_t::as_byte

Valid when type is PN_BYTE.

## as_bytes

pn_bytes_t pn_atom_t::as_bytes

Valid when type is PN_BINARY or PN_STRING or PN_SYMBOL.

When the type is PN_STRING the field will point to utf8 encoded unicode. When the type is PN_SYMBOL, the field will point to 7-bit ASCII. In the latter two cases, the bytes pointed to are not necessarily null terminated.

## as_char

pn_char_t pn_atom_t::as_char

Valid when type is PN_CHAR.

## as_decimal128

pn_decimal128_t pn_atom_t::as_decimal128

Valid when type is PN_DECIMAL128.

## as_decimal32

pn_decimal32_t pn_atom_t::as_decimal32

Valid when type is PN_DECIMAL32.

## as_decimal64

pn_decimal64_t pn_atom_t::as_decimal64

Valid when type is PN_DECIMAL64.

## as_double

double pn_atom_t::as_double

Valid when type is PN_DOUBLE.

## as_float

float pn_atom_t::as_float

Valid when type is PN_FLOAT.

## as_int

int32_t pn_atom_t::as_int

Valid when type is PN_INT.

## as_long

int64_t pn_atom_t::as_long

Valid when type is PN_LONG.

## as_short

int16_t pn_atom_t::as_short

Valid when type is PN_SHORT.

## as_timestamp

pn_timestamp_t pn_atom_t::as_timestamp

Valid when type is PN_TIMESTAMP.

## as_ubyte

uint8_t pn_atom_t::as_ubyte

Valid when type is PN_UBYTE.

## as_uint

uint32_t pn_atom_t::as_uint

Valid when type is PN_UINT.

## as_ulong

uint64_t pn_atom_t::as_ulong

Valid when type is PN_ULONG.

## as_ushort

uint16_t pn_atom_t::as_ushort

Valid when type is PN_USHORT.

## as_uuid

pn_uuid_t pn_atom_t::as_uuid

Valid when type is PN_UUID.

## type

pn_type_t pn_atom_t::type

Indicates the type of value the atom is currently pointing to.

See pn_type_t for details on AMQP types.

## u

union { ... } pn_atom_t::u

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

- /build/qpid-proton-4llz2H/qpid-proton-0.14.0/proton-c/include/proton/codec.h