HCE project C++ developers source code library  1.1.1
HCE project developer library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
HCE::JsonMessageCover Class Reference

#include <JsonMessageCover.hpp>

Inheritance diagram for HCE::JsonMessageCover:
Collaboration diagram for HCE::JsonMessageCover:

Public Types

enum  ErrorCode { NO_ERROR = 0, ERROR_SERIALIZE = 1, ERROR_UNSERIALIZE = 2 }

Public Member Functions

 JsonMessageCover (const std::string &json="")
 JsonMessageCover (types::MessageType messageType_, const std::string &messageBody_, unsigned int ttl_=HCE::jsonMessageCoverConst::defaultTTLValue)
 JsonMessageCover (unsigned int messageType_, const std::string &messageBody_, unsigned int ttl_=HCE::jsonMessageCoverConst::defaultTTLValue)
virtual ~JsonMessageCover (void)
bool serialize (std::string &json)
bool unserialize (const std::string &json)
void setType (unsigned int messageType_)
void setType (types::MessageType messageType_)
types::MessageType getType (void) const
void setData (const std::string &messageBody_)
std::string getData (void)
void setTTL (unsigned int ttl)
unsigned int getTTL (void) const
- Public Member Functions inherited from HCE::IJsonSerializable
 IJsonSerializable (void)
virtual ~IJsonSerializable (void)
void setErrorMsg (const std::string &errorMsg_)
std::string getErrorMsg (void) const
void setErrorCode (unsigned int errorCode_)
unsigned int getErrorCode (void) const
bool isError (void) const

Friends

std::istream & operator>> (std::istream &is, HCE::JsonMessageCover &jsonHandler)
std::ostream & operator<< (std::ostream &os, const HCE::JsonMessageCover &jsonHandler)

Additional Inherited Members

- Protected Member Functions inherited from HCE::IJsonSerializable
template<class T = unsigned long long>
convertVarToNumeric (Poco::Dynamic::Var &var, T defaultValue)
- Protected Attributes inherited from HCE::IJsonSerializable
std::string errorMsg
unsigned int errorCode
bool _isError

Detailed Description

Definition at line 31 of file JsonMessageCover.hpp.

Member Enumeration Documentation

Enumerator:
NO_ERROR 
ERROR_SERIALIZE 
ERROR_UNSERIALIZE 

Definition at line 34 of file JsonMessageCover.hpp.

Constructor & Destructor Documentation

HCE::JsonMessageCover::JsonMessageCover ( const std::string &  json = "")
explicit

Definition at line 15 of file JsonMessageCover.cpp.

Here is the call graph for this function:

HCE::JsonMessageCover::JsonMessageCover ( types::MessageType  messageType_,
const std::string &  messageBody_,
unsigned int  ttl_ = HCE::jsonMessageCoverConst::defaultTTLValue 
)

Definition at line 23 of file JsonMessageCover.cpp.

HCE::JsonMessageCover::JsonMessageCover ( unsigned int  messageType_,
const std::string &  messageBody_,
unsigned int  ttl_ = HCE::jsonMessageCoverConst::defaultTTLValue 
)

Definition at line 29 of file JsonMessageCover.cpp.

virtual HCE::JsonMessageCover::~JsonMessageCover ( void  )
inlinevirtual

Definition at line 51 of file JsonMessageCover.hpp.

Member Function Documentation

std::string HCE::JsonMessageCover::getData ( void  )
inline

Definition at line 61 of file JsonMessageCover.hpp.

unsigned int HCE::JsonMessageCover::getTTL ( void  ) const
inline

Definition at line 64 of file JsonMessageCover.hpp.

types::MessageType HCE::JsonMessageCover::getType ( void  ) const
inline

Definition at line 58 of file JsonMessageCover.hpp.

bool HCE::JsonMessageCover::serialize ( std::string &  json)
virtual

Implements HCE::IJsonSerializable.

Definition at line 35 of file JsonMessageCover.cpp.

Here is the call graph for this function:

void HCE::JsonMessageCover::setData ( const std::string &  messageBody_)
inline

Definition at line 60 of file JsonMessageCover.hpp.

void HCE::JsonMessageCover::setTTL ( unsigned int  ttl)
inline

Definition at line 63 of file JsonMessageCover.hpp.

void HCE::JsonMessageCover::setType ( unsigned int  messageType_)
inline

Definition at line 56 of file JsonMessageCover.hpp.

void HCE::JsonMessageCover::setType ( types::MessageType  messageType_)
inline

Definition at line 57 of file JsonMessageCover.hpp.

bool HCE::JsonMessageCover::unserialize ( const std::string &  json)
virtual

Implements HCE::IJsonSerializable.

Definition at line 60 of file JsonMessageCover.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const HCE::JsonMessageCover jsonHandler 
)
friend

Definition at line 119 of file JsonMessageCover.cpp.

std::istream& operator>> ( std::istream &  is,
HCE::JsonMessageCover jsonHandler 
)
friend

Definition at line 108 of file JsonMessageCover.cpp.


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