OpenMAMA C++ API
Wombat::MamaMsgField Class Reference

MamaMsg field representation. More...

#include <MamaMsgField.h>

Public Member Functions

 ~MamaMsgField ()
 
 MamaMsgField (void)
 
 MamaMsgField (mamaMsgField field)
 
void clear ()
 Clear the field. More...
 
void set (mamaMsgField field)
 Set this field to a different MAMA C API field. More...
 
const MamaFieldDescriptorgetDescriptor () const
 
mama_fid_t getFid () const
 Return the field identifier. More...
 
const char * getName () const
 Return the field name. More...
 
mamaFieldType getType () const
 Return the field type. More...
 
const char * getTypeName () const
 Return the field type name. More...
 
mama_bool_t getBool () const
 Get as a boolean field. More...
 
char getChar () const
 Get as a character field. More...
 
mama_i8_t getI8 () const
 Get as a I8 field. More...
 
mama_u8_t getU8 () const
 Get as a U8 field. More...
 
mama_i16_t getI16 () const
 Get as a I16 field. More...
 
mama_u16_t getU16 () const
 Get as a U16 field. More...
 
mama_i32_t getI32 () const
 Get as a I32 field. More...
 
mama_u32_t getU32 () const
 Get as a U32 field. More...
 
mama_i64_t getI64 () const
 Get as a I64 field. More...
 
mama_u64_t getU64 () const
 Get as a U64 field. More...
 
mama_f32_t getF32 () const
 Get as a f32 field. More...
 
mama_f64_t getF64 () const
 Get as a f64 field. More...
 
const char * getString () const
 Get as a const char* field. More...
 
const void * getOpaque (mama_size_t &size) const
 Get as a const void* field. More...
 
void getDateTime (MamaDateTime &result) const
 Get as a MamaDateTime field. More...
 
void getPrice (MamaPrice &result) const
 Get as a MamaPrice field. More...
 
void getMsg (MamaMsg &result) const
 Get as a MamaMsg field. More...
 
void getVectorBool (const mama_bool_t *&result, mama_size_t &resultLen) const
 Get a vector of boolean. More...
 
void getVectorChar (const char *&result, mama_size_t &resultLen) const
 Get a vector of characters. More...
 
void getVectorI8 (const mama_i8_t *&result, mama_size_t &resultLen) const
 Get a vector of signed 8-bit integers. More...
 
void getVectorU8 (const mama_u8_t *&result, mama_size_t &resultLen) const
 Get a vector of unsigned 8-bit integers. More...
 
void getVectorI16 (const mama_i16_t *&result, mama_size_t &resultLen) const
 Get a vector of signed 16-bit integers. More...
 
void getVectorU16 (const mama_u16_t *&result, mama_size_t &resultLen) const
 Get a vector of unsigned 16-bit integers. More...
 
void getVectorI32 (const mama_i32_t *&result, mama_size_t &resultLen) const
 Get a vector of signed 32-bit integers. More...
 
void getVectorU32 (const mama_u32_t *&result, mama_size_t &resultLen) const
 Get a vector of unsigned 32-bit integers. More...
 
void getVectorI64 (const mama_i64_t *&result, mama_size_t &resultLen) const
 Get a vector of signed 64-bit integers. More...
 
void getVectorU64 (const mama_u64_t *&result, mama_size_t &resultLen) const
 Get a vector of unsigned 64-bit integers. More...
 
void getVectorF32 (const mama_f32_t *&result, mama_size_t &resultLen) const
 Get a vector of 32-bit floats. More...
 
void getVectorF64 (const mama_f64_t *&result, mama_size_t &resultLen) const
 Get a vector of 64-bit floats. More...
 
void getVectorString (const char **&result, mama_size_t &resultLen) const
 Get a vector of strings. More...
 
void getVectorMsg (const MamaMsg **&result, mama_size_t &resultLen) const
 Get a vector of submessages field. More...
 
void getVectorMsgDetached (const MamaMsg **&result, mama_size_t &resultLen) const
 Get a vector of submessages field. More...
 
void getAsString (char *result, mama_size_t maxResultLen) const
 Return a string representation the field with the given fid. More...
 
void updateBool (mama_bool_t value)
 Update the specified field with a new bool value. More...
 
void updateChar (char value)
 Update the specified field with a new char value. More...
 
void updateI8 (mama_i8_t value)
 Update the specified field with a new i8 value. More...
 
void updateU8 (mama_u8_t value)
 Update the specified field with a new u8 value. More...
 
void updateI16 (mama_i16_t value)
 Update the specified field with a new i16 value. More...
 
void updateU16 (mama_u16_t value)
 Update the specified field with a new u16 value. More...
 
void updateI32 (mama_i32_t value)
 Update the specified field with a new i32 value. More...
 
void updateU32 (mama_u32_t value)
 Update the specified field with a new u32 value. More...
 
void updateI64 (mama_i64_t value)
 Update the specified field with a new i64 value. More...
 
void updateU64 (mama_u64_t value)
 Update the specified field with a new u64 value. More...
 
void updateF32 (mama_f32_t value)
 Update the specified field with a new f32 value. More...
 
void updateF64 (mama_f64_t value)
 Update the specified field with a new f64 value. More...
 
void updateDateTime (const mamaDateTime value)
 Update the specified field with a new date/time value. More...
 
void updateDateTime (const MamaDateTime value)
 Update the specified field with a new date/time value. More...
 
void updatePrice (const mamaPrice value)
 Update the specified field with a new price value. More...
 
void updatePrice (const MamaPrice value)
 Update the specified field with a new price value. More...
 
bool operator== (const MamaMsgField &) const
 
bool operator!= (const MamaMsgField &) const
 

Detailed Description

MamaMsg field representation.

Constructor & Destructor Documentation

§ ~MamaMsgField()

Wombat::MamaMsgField::~MamaMsgField ( )

§ MamaMsgField() [1/2]

Wombat::MamaMsgField::MamaMsgField ( void  )

§ MamaMsgField() [2/2]

Wombat::MamaMsgField::MamaMsgField ( mamaMsgField  field)

Member Function Documentation

§ clear()

void Wombat::MamaMsgField::clear ( )

Clear the field.

§ set()

void Wombat::MamaMsgField::set ( mamaMsgField  field)

Set this field to a different MAMA C API field.

§ getDescriptor()

const MamaFieldDescriptor* Wombat::MamaMsgField::getDescriptor ( ) const

§ getFid()

mama_fid_t Wombat::MamaMsgField::getFid ( ) const

Return the field identifier.

Returns
The fid.

§ getName()

const char* Wombat::MamaMsgField::getName ( ) const

Return the field name.

Returns
The name.

§ getType()

mamaFieldType Wombat::MamaMsgField::getType ( ) const

Return the field type.

Returns
The type.

§ getTypeName()

const char* Wombat::MamaMsgField::getTypeName ( ) const

Return the field type name.

The type name is a human readable representation of the type.

Returns
The type name.

§ getBool()

mama_bool_t Wombat::MamaMsgField::getBool ( ) const

Get as a boolean field.

Returns
The boolean value.

§ getChar()

char Wombat::MamaMsgField::getChar ( ) const

Get as a character field.

Returns
The character value.

§ getI8()

mama_i8_t Wombat::MamaMsgField::getI8 ( ) const

Get as a I8 field.

Returns
The integer value.

§ getU8()

mama_u8_t Wombat::MamaMsgField::getU8 ( ) const

Get as a U8 field.

Returns
The integer value.

§ getI16()

mama_i16_t Wombat::MamaMsgField::getI16 ( ) const

Get as a I16 field.

Returns
The integer value.

§ getU16()

mama_u16_t Wombat::MamaMsgField::getU16 ( ) const

Get as a U16 field.

Returns
The integer value.

§ getI32()

mama_i32_t Wombat::MamaMsgField::getI32 ( ) const

Get as a I32 field.

Returns
The integer value.

§ getU32()

mama_u32_t Wombat::MamaMsgField::getU32 ( ) const

Get as a U32 field.

Returns
The integer value.

§ getI64()

mama_i64_t Wombat::MamaMsgField::getI64 ( ) const

Get as a I64 field.

Returns
The field value as a long.

§ getU64()

mama_u64_t Wombat::MamaMsgField::getU64 ( ) const

Get as a U64 field.

Returns
The field value as a long.

§ getF32()

mama_f32_t Wombat::MamaMsgField::getF32 ( ) const

Get as a f32 field.

Returns
The field value as a 32 bit floating point number.

§ getF64()

mama_f64_t Wombat::MamaMsgField::getF64 ( ) const

Get as a f64 field.

Returns
The field value as a 64 bit floating point number.

§ getString()

const char* Wombat::MamaMsgField::getString ( ) const

Get as a const char* field.

Returns
the string value.

§ getOpaque()

const void* Wombat::MamaMsgField::getOpaque ( mama_size_t size) const

Get as a const void* field.

Returns
The opaque value.

§ getDateTime()

void Wombat::MamaMsgField::getDateTime ( MamaDateTime result) const

Get as a MamaDateTime field.

Parameters
resultThe date/time value.

§ getPrice()

void Wombat::MamaMsgField::getPrice ( MamaPrice result) const

Get as a MamaPrice field.

Parameters
resultThe price value.

§ getMsg()

void Wombat::MamaMsgField::getMsg ( MamaMsg result) const

Get as a MamaMsg field.

Parameters
resultThe msg value.

§ getVectorBool()

void Wombat::MamaMsgField::getVectorBool ( const mama_bool_t *&  result,
mama_size_t resultLen 
) const

Get a vector of boolean.

Parameters
result(out) the vector.
resultLen(out) the size of the vector.

§ getVectorChar()

void Wombat::MamaMsgField::getVectorChar ( const char *&  result,
mama_size_t resultLen 
) const

Get a vector of characters.

Parameters
result(out) the vector.
resultLen(out) the size of the vector.

§ getVectorI8()

void Wombat::MamaMsgField::getVectorI8 ( const mama_i8_t *&  result,
mama_size_t resultLen 
) const

Get a vector of signed 8-bit integers.

Parameters
result(out) the vector.
resultLen(out) the size of the vector.

§ getVectorU8()

void Wombat::MamaMsgField::getVectorU8 ( const mama_u8_t *&  result,
mama_size_t resultLen 
) const

Get a vector of unsigned 8-bit integers.

Parameters
result(out) the vector.
resultLen(out) the size of the vector.

§ getVectorI16()

void Wombat::MamaMsgField::getVectorI16 ( const mama_i16_t *&  result,
mama_size_t resultLen 
) const

Get a vector of signed 16-bit integers.

Parameters
result(out) the vector.
resultLen(out) the size of the vector.

§ getVectorU16()

void Wombat::MamaMsgField::getVectorU16 ( const mama_u16_t *&  result,
mama_size_t resultLen 
) const

Get a vector of unsigned 16-bit integers.

Parameters
result(out) the vector.
resultLen(out) the size of the vector.

§ getVectorI32()

void Wombat::MamaMsgField::getVectorI32 ( const mama_i32_t *&  result,
mama_size_t resultLen 
) const

Get a vector of signed 32-bit integers.

Parameters
result(out) the vector.
resultLen(out) the size of the vector.

§ getVectorU32()

void Wombat::MamaMsgField::getVectorU32 ( const mama_u32_t *&  result,
mama_size_t resultLen 
) const

Get a vector of unsigned 32-bit integers.

Parameters
result(out) the vector.
resultLen(out) the size of the vector.

§ getVectorI64()

void Wombat::MamaMsgField::getVectorI64 ( const mama_i64_t *&  result,
mama_size_t resultLen 
) const

Get a vector of signed 64-bit integers.

Parameters
result(out) the vector.
resultLen(out) the size of the vector.

§ getVectorU64()

void Wombat::MamaMsgField::getVectorU64 ( const mama_u64_t *&  result,
mama_size_t resultLen 
) const

Get a vector of unsigned 64-bit integers.

Parameters
result(out) the vector.
resultLen(out) the size of the vector.

§ getVectorF32()

void Wombat::MamaMsgField::getVectorF32 ( const mama_f32_t *&  result,
mama_size_t resultLen 
) const

Get a vector of 32-bit floats.

Parameters
result(out) the vector.
resultLen(out) the size of the vector.

§ getVectorF64()

void Wombat::MamaMsgField::getVectorF64 ( const mama_f64_t *&  result,
mama_size_t resultLen 
) const

Get a vector of 64-bit floats.

Parameters
result(out) the vector.
resultLen(out) the size of the vector.

§ getVectorString()

void Wombat::MamaMsgField::getVectorString ( const char **&  result,
mama_size_t resultLen 
) const

Get a vector of strings.

Parameters
result(out) the vector.
resultLen(out) the size of the vector.

§ getVectorMsg()

void Wombat::MamaMsgField::getVectorMsg ( const MamaMsg **&  result,
mama_size_t resultLen 
) const

Get a vector of submessages field.

Note: The vector is only valid for the lifetime of the field object which, when iterating over fields in a message is only as long as the individual callback itself. Use getVectorMsgDetached if it is necessary to keep the vector of messages longer than the lifetime of the field.

Parameters
result(out) vector.
resultLen(out) the size of the vector.

§ getVectorMsgDetached()

void Wombat::MamaMsgField::getVectorMsgDetached ( const MamaMsg **&  result,
mama_size_t resultLen 
) const

Get a vector of submessages field.

Deallocating the memory allocated for array and it members will become the responsibility of the caller.

Parameters
result(out) vector.
resultLen(out) the size of the vector.

§ getAsString()

void Wombat::MamaMsgField::getAsString ( char *  result,
mama_size_t  maxResultLen 
) const

Return a string representation the field with the given fid.

Parameters
resultBuffer to put result.
maxResultLenMaximum size of buffer to put result.

§ updateBool()

void Wombat::MamaMsgField::updateBool ( mama_bool_t  value)

Update the specified field with a new bool value.

Parameters
valueThe new value for the field.
Exceptions
MamaStatusexception with the following possible status values. MAMA_STATUS_WRONG_FIELD_TYPE The existing field type does not match the type of the update method called. MAMA_STATUS_NULL_ARG The field passed to the C function is NULL. MAMA_STATUS_INVALID_ARG The underlying bridge field is NULL.

§ updateChar()

void Wombat::MamaMsgField::updateChar ( char  value)

Update the specified field with a new char value.

Parameters
valueThe new value for the field.
Exceptions
MamaStatusexception with the following possible status values. MAMA_STATUS_WRONG_FIELD_TYPE The existing field type does not match the type of the update method called. MAMA_STATUS_NULL_ARG The field passed to the C function is NULL. MAMA_STATUS_INVALID_ARG The underlying bridge field is NULL.

§ updateI8()

void Wombat::MamaMsgField::updateI8 ( mama_i8_t  value)

Update the specified field with a new i8 value.

Parameters
valueThe new value for the field.
Exceptions
MamaStatusexception with the following possible status values. MAMA_STATUS_WRONG_FIELD_TYPE The existing field type does not match the type of the update method called. MAMA_STATUS_NULL_ARG The field passed to the C function is NULL. MAMA_STATUS_INVALID_ARG The underlying bridge field is NULL.

§ updateU8()

void Wombat::MamaMsgField::updateU8 ( mama_u8_t  value)

Update the specified field with a new u8 value.

Parameters
valueThe new value for the field.
Exceptions
MamaStatusexception with the following possible status values. MAMA_STATUS_WRONG_FIELD_TYPE The existing field type does not match the type of the update method called. MAMA_STATUS_NULL_ARG The field passed to the C function is NULL. MAMA_STATUS_INVALID_ARG The underlying bridge field is NULL.

§ updateI16()

void Wombat::MamaMsgField::updateI16 ( mama_i16_t  value)

Update the specified field with a new i16 value.

Parameters
valueThe new value for the field.
Exceptions
MamaStatusexception with the following possible status values. MAMA_STATUS_WRONG_FIELD_TYPE The existing field type does not match the type of the update method called. MAMA_STATUS_NULL_ARG The field passed to the C function is NULL. MAMA_STATUS_INVALID_ARG The underlying bridge field is NULL.

§ updateU16()

void Wombat::MamaMsgField::updateU16 ( mama_u16_t  value)

Update the specified field with a new u16 value.

Parameters
valueThe new value for the field.
Exceptions
MamaStatusexception with the following possible status values. MAMA_STATUS_WRONG_FIELD_TYPE The existing field type does not match the type of the update method called. MAMA_STATUS_NULL_ARG The field passed to the C function is NULL. MAMA_STATUS_INVALID_ARG The underlying bridge field is NULL.

§ updateI32()

void Wombat::MamaMsgField::updateI32 ( mama_i32_t  value)

Update the specified field with a new i32 value.

Parameters
valueThe new value for the field.
Exceptions
MamaStatusexception with the following possible status values. MAMA_STATUS_WRONG_FIELD_TYPE The existing field type does not match the type of the update method called. MAMA_STATUS_NULL_ARG The field passed to the C function is NULL. MAMA_STATUS_INVALID_ARG The underlying bridge field is NULL.

§ updateU32()

void Wombat::MamaMsgField::updateU32 ( mama_u32_t  value)

Update the specified field with a new u32 value.

Parameters
valueThe new value for the field.
Exceptions
MamaStatusexception with the following possible status values. MAMA_STATUS_WRONG_FIELD_TYPE The existing field type does not match the type of the update method called. MAMA_STATUS_NULL_ARG The field passed to the C function is NULL. MAMA_STATUS_INVALID_ARG The underlying bridge field is NULL.

§ updateI64()

void Wombat::MamaMsgField::updateI64 ( mama_i64_t  value)

Update the specified field with a new i64 value.

Parameters
valueThe new value for the field.
Exceptions
MamaStatusexception with the following possible status values. MAMA_STATUS_WRONG_FIELD_TYPE The existing field type does not match the type of the update method called. MAMA_STATUS_NULL_ARG The field passed to the C function is NULL. MAMA_STATUS_INVALID_ARG The underlying bridge field is NULL.

§ updateU64()

void Wombat::MamaMsgField::updateU64 ( mama_u64_t  value)

Update the specified field with a new u64 value.

Parameters
valueThe new value for the field.
Exceptions
MamaStatusexception with the following possible status values. MAMA_STATUS_WRONG_FIELD_TYPE The existing field type does not match the type of the update method called. MAMA_STATUS_NULL_ARG The field passed to the C function is NULL. MAMA_STATUS_INVALID_ARG The underlying bridge field is NULL.

§ updateF32()

void Wombat::MamaMsgField::updateF32 ( mama_f32_t  value)

Update the specified field with a new f32 value.

Parameters
valueThe new value for the field.
Exceptions
MamaStatusexception with the following possible status values. MAMA_STATUS_WRONG_FIELD_TYPE The existing field type does not match the type of the update method called. MAMA_STATUS_NULL_ARG The field passed to the C function is NULL. MAMA_STATUS_INVALID_ARG The underlying bridge field is NULL.

§ updateF64()

void Wombat::MamaMsgField::updateF64 ( mama_f64_t  value)

Update the specified field with a new f64 value.

Parameters
valueThe new value for the field.
Exceptions
MamaStatusexception with the following possible status values. MAMA_STATUS_WRONG_FIELD_TYPE The existing field type does not match the type of the update method called. MAMA_STATUS_NULL_ARG The field passed to the C function is NULL. MAMA_STATUS_INVALID_ARG The underlying bridge field is NULL.

§ updateDateTime() [1/2]

void Wombat::MamaMsgField::updateDateTime ( const mamaDateTime  value)

Update the specified field with a new date/time value.

Parameters
valueThe new value for the field (mamaDateTime object).
Exceptions
MamaStatusexception with the following possible status values. MAMA_STATUS_WRONG_FIELD_TYPE The existing field type does not match the type of the update method called. MAMA_STATUS_NULL_ARG The field passed to the C function is NULL. MAMA_STATUS_INVALID_ARG The underlying bridge field is NULL.

§ updateDateTime() [2/2]

void Wombat::MamaMsgField::updateDateTime ( const MamaDateTime  value)

Update the specified field with a new date/time value.

Parameters
valueThe new value for the field (MamaDateTime object).
Exceptions
MamaStatusexception with the following possible status values. MAMA_STATUS_WRONG_FIELD_TYPE The existing field type does not match the type of the update method called. MAMA_STATUS_NULL_ARG The field passed to the C function is NULL. MAMA_STATUS_INVALID_ARG The underlying bridge field is NULL.

§ updatePrice() [1/2]

void Wombat::MamaMsgField::updatePrice ( const mamaPrice  value)

Update the specified field with a new price value.

Parameters
valueThe new value for the field (mamaPrice object).
Exceptions
MamaStatusexception with the following possible status values. MAMA_STATUS_WRONG_FIELD_TYPE The existing field type does not match the type of the update method called. MAMA_STATUS_NULL_ARG The field passed to the C function is NULL. MAMA_STATUS_INVALID_ARG The underlying bridge field is NULL.

§ updatePrice() [2/2]

void Wombat::MamaMsgField::updatePrice ( const MamaPrice  value)

Update the specified field with a new price value.

Parameters
valueThe new value for the field (MamaPrice object).
Exceptions
MamaStatusexception with the following possible status values. MAMA_STATUS_WRONG_FIELD_TYPE The existing field type does not match the type of the update method called. MAMA_STATUS_NULL_ARG The field passed to the C function is NULL. MAMA_STATUS_INVALID_ARG The underlying bridge field is NULL.

§ operator==()

bool Wombat::MamaMsgField::operator== ( const MamaMsgField ) const

§ operator!=()

bool Wombat::MamaMsgField::operator!= ( const MamaMsgField ) const