EII Message Bus C Reference
Public Member Functions | List of all members
eii::msgbus::MsgEnvelope Class Reference

#include <msg_envelope.hpp>

Public Member Functions

 MsgEnvelope (content_type_t ct)
 
 MsgEnvelope (msg_envelope_t *msgenv)
 
void put_integer (const std::string key, int64_t value)
 
void put_float (const std::string key, double value)
 
void put_string (const std::string key, const std::string value)
 
void put_bool (const std::string key, bool value)
 
void put_array (const std::string key, MsgEnvelopeList *value)
 
template<typename T >
void put_vector (const std::string key, std::vector< T > const &value)
 
void put_object (const std::string key, MsgEnvelopeObject *value)
 
void put_blob (char *value, size_t size)
 
void remove (const std::string key)
 
int64_t get_int (const std::string key)
 
double get_float (const std::string key)
 
const char * get_string (const std::string key)
 
bool get_bool (const std::string key)
 
char * get_blob (const std::string key)
 
MsgEnvelopeObjectget_object (const std::string key)
 
MsgEnvelopeListget_array (const std::string key)
 
MsgEnvelopeElementget_msg_envelope_element (const std::string key)
 
msg_envelope_tget_msg_envelope ()
 
 ~MsgEnvelope ()
 

Detailed Description

MsgEnvelope class

Constructor & Destructor Documentation

◆ MsgEnvelope() [1/2]

eii::msgbus::MsgEnvelope::MsgEnvelope ( content_type_t  ct)

Constructor

Exceptions

◆ MsgEnvelope() [2/2]

eii::msgbus::MsgEnvelope::MsgEnvelope ( msg_envelope_t msgenv)

Constructor

Exceptions

◆ ~MsgEnvelope()

eii::msgbus::MsgEnvelope::~MsgEnvelope ( )

Destructor

Member Function Documentation

◆ get_array()

MsgEnvelopeList* eii::msgbus::MsgEnvelope::get_array ( const std::string  key)

To fetch a MsgEnvelopeList value associated with the key provided

Exceptions

◆ get_blob()

char* eii::msgbus::MsgEnvelope::get_blob ( const std::string  key)

To fetch blob from MsgEnvelope

Exceptions

◆ get_bool()

bool eii::msgbus::MsgEnvelope::get_bool ( const std::string  key)

To fetch a boolean value associated with the key provided

Exceptions

◆ get_float()

double eii::msgbus::MsgEnvelope::get_float ( const std::string  key)

To fetch a float value associated with the key provided

Exceptions

◆ get_int()

int64_t eii::msgbus::MsgEnvelope::get_int ( const std::string  key)

To fetch an integer value associated with the key provided

Exceptions

◆ get_msg_envelope()

msg_envelope_t* eii::msgbus::MsgEnvelope::get_msg_envelope ( )

Getter to retrieve the underlying msg_envelope_t structure

Returns
msg_envelope_t - returns the msg_envelope_t struct

◆ get_msg_envelope_element()

MsgEnvelopeElement* eii::msgbus::MsgEnvelope::get_msg_envelope_element ( const std::string  key)

To fetch a MsgEnvelopeElement value associated with the key provided

Exceptions

◆ get_object()

MsgEnvelopeObject* eii::msgbus::MsgEnvelope::get_object ( const std::string  key)

To fetch a MsgEnvelopeObject value associated with the key provided

Exceptions

◆ get_string()

const char* eii::msgbus::MsgEnvelope::get_string ( const std::string  key)

To fetch a string associated with the key provided

Exceptions

◆ put_array()

void eii::msgbus::MsgEnvelope::put_array ( const std::string  key,
MsgEnvelopeList value 
)

Add a MsgEnvelopeList to the MsgEnvelope object.

Exceptions

◆ put_blob()

void eii::msgbus::MsgEnvelope::put_blob ( char *  value,
size_t  size 
)

Add a new blob to the MsgEnvelope object.

Exceptions

◆ put_bool()

void eii::msgbus::MsgEnvelope::put_bool ( const std::string  key,
bool  value 
)

Add a new boolean value to the MsgEnvelope object.

Exceptions

◆ put_float()

void eii::msgbus::MsgEnvelope::put_float ( const std::string  key,
double  value 
)

Add a new floating value to the MsgEnvelope object.

Exceptions

◆ put_integer()

void eii::msgbus::MsgEnvelope::put_integer ( const std::string  key,
int64_t  value 
)

Add a new integer value to the MsgEnvelope object.

Exceptions

◆ put_object()

void eii::msgbus::MsgEnvelope::put_object ( const std::string  key,
MsgEnvelopeObject value 
)

Add a new nested MsgEnvelopeObject to the MsgEnvelope object.

Exceptions

◆ put_string()

void eii::msgbus::MsgEnvelope::put_string ( const std::string  key,
const std::string  value 
)

Add a new string value to the MsgEnvelope object.

Exceptions

◆ put_vector()

template<typename T >
void eii::msgbus::MsgEnvelope::put_vector ( const std::string  key,
std::vector< T > const &  value 
)
inline

Add a vector as an array to the MsgEnvelope object. Note: The supported types for the vector are integer, float & bool only. Add a MsgEnvelopeList to the MsgEnvelope object.

Exceptions

◆ remove()

void eii::msgbus::MsgEnvelope::remove ( const std::string  key)

To remove value associated with the key provided

Exceptions

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