HCE project C++ developers source code library
1.1.1
HCE project developer library
|
#include <JsonMessageCover.hpp>
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> | |
T | convertVarToNumeric (Poco::Dynamic::Var &var, T defaultValue) |
Protected Attributes inherited from HCE::IJsonSerializable | |
std::string | errorMsg |
unsigned int | errorCode |
bool | _isError |
Definition at line 31 of file JsonMessageCover.hpp.
Definition at line 34 of file JsonMessageCover.hpp.
|
explicit |
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.
|
inlinevirtual |
Definition at line 51 of file JsonMessageCover.hpp.
|
inline |
Definition at line 61 of file JsonMessageCover.hpp.
|
inline |
Definition at line 64 of file JsonMessageCover.hpp.
|
inline |
Definition at line 58 of file JsonMessageCover.hpp.
|
virtual |
Implements HCE::IJsonSerializable.
Definition at line 35 of file JsonMessageCover.cpp.
|
inline |
Definition at line 60 of file JsonMessageCover.hpp.
|
inline |
Definition at line 63 of file JsonMessageCover.hpp.
|
inline |
Definition at line 56 of file JsonMessageCover.hpp.
|
inline |
Definition at line 57 of file JsonMessageCover.hpp.
|
virtual |
Implements HCE::IJsonSerializable.
Definition at line 60 of file JsonMessageCover.cpp.
|
friend |
Definition at line 119 of file JsonMessageCover.cpp.
|
friend |
Definition at line 108 of file JsonMessageCover.cpp.