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