libhomegear-base  0.7
Base library for Homegear and Homegear family modules.
BaseLib::Rpc::JsonEncoder Class Reference

#include <JsonEncoder.h>

Public Member Functions

 JsonEncoder ()=default
 
 JsonEncoder (BaseLib::SharedObjects *dummy)
 
virtual ~JsonEncoder ()=default
 
void encodeRequest (std::string &methodName, std::shared_ptr< std::list< std::shared_ptr< Variable >>> &parameters, std::vector< char > &encodedData)
 
std::vector< char > encodeRequest (const std::string &methodName, const std::shared_ptr< Variable > &parameters)
 

Static Public Member Functions

static void encode (const std::shared_ptr< Variable > &variable, std::string &json)
 
static void encode (const std::shared_ptr< Variable > &variable, std::vector< char > &json)
 
static std::string encode (const std::shared_ptr< Variable > &variable)
 
static std::vector< char > encodeBinary (const std::shared_ptr< Variable > &variable)
 
static void encodeResponse (const std::shared_ptr< Variable > &variable, int32_t id, std::vector< char > &json)
 
static void encodeMQTTResponse (const std::string &methodName, const std::shared_ptr< Variable > &variable, int32_t id, std::vector< char > &json)
 
static std::string encodeString (const std::string &s)
 

Constructor & Destructor Documentation

§ JsonEncoder() [1/2]

BaseLib::Rpc::JsonEncoder::JsonEncoder ( )
default

§ JsonEncoder() [2/2]

BaseLib::Rpc::JsonEncoder::JsonEncoder ( BaseLib::SharedObjects dummy)
inlineexplicit

§ ~JsonEncoder()

virtual BaseLib::Rpc::JsonEncoder::~JsonEncoder ( )
virtualdefault

Member Function Documentation

§ encode() [1/3]

void BaseLib::Rpc::JsonEncoder::encode ( const std::shared_ptr< Variable > &  variable,
std::string &  json 
)
static

§ encode() [2/3]

void BaseLib::Rpc::JsonEncoder::encode ( const std::shared_ptr< Variable > &  variable,
std::vector< char > &  json 
)
static

§ encode() [3/3]

std::string BaseLib::Rpc::JsonEncoder::encode ( const std::shared_ptr< Variable > &  variable)
static

§ encodeBinary()

std::vector< char > BaseLib::Rpc::JsonEncoder::encodeBinary ( const std::shared_ptr< Variable > &  variable)
static

§ encodeMQTTResponse()

void BaseLib::Rpc::JsonEncoder::encodeMQTTResponse ( const std::string &  methodName,
const std::shared_ptr< Variable > &  variable,
int32_t  id,
std::vector< char > &  json 
)
static

§ encodeRequest() [1/2]

void BaseLib::Rpc::JsonEncoder::encodeRequest ( std::string &  methodName,
std::shared_ptr< std::list< std::shared_ptr< Variable >>> &  parameters,
std::vector< char > &  encodedData 
)

§ encodeRequest() [2/2]

std::vector< char > BaseLib::Rpc::JsonEncoder::encodeRequest ( const std::string &  methodName,
const std::shared_ptr< Variable > &  parameters 
)

§ encodeResponse()

void BaseLib::Rpc::JsonEncoder::encodeResponse ( const std::shared_ptr< Variable > &  variable,
int32_t  id,
std::vector< char > &  json 
)
static

§ encodeString()

std::string BaseLib::Rpc::JsonEncoder::encodeString ( const std::string &  s)
static

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