10Duke Enterprise C++ SDK
Toggle main menu visibility
Loading...
Searching...
No Matches
CJsonString.h
1
#ifndef TENDUKE_JSON_CJSONSTRING_H
2
#define TENDUKE_JSON_CJSONSTRING_H
3
4
#include "./CJsonElement.h"
5
#include "json/JSONString.h"
6
7
namespace
tenduke
{
namespace
json
{
namespace
cjson
{
8
12
class
CjsonString
:
public
tenduke::json::cjson::CjsonElement
,
public
tenduke::json::JSONString
13
{
14
public
:
20
CjsonString
(std::string value, cJSON *
element
)
21
:
CjsonElement
(
JSONElement
::
Type
::STRING,
element
), value(std::move(value))
22
{}
23
~CjsonString
()
override
=
default
;
24
25
std::string
asString
()
const override
26
{
27
return
value;
28
}
29
std::string
getValue
()
const override
{
return
value;}
30
31
private
:
32
std::string value;
33
};
34
35
}}}
36
37
#endif
// TENDUKE_JSON_CJSONSTRING_H
tenduke::json::JSONElement
Superclass of JSON elements.
Definition
JSONElement.h:12
tenduke::json::JSONElement::Type
Type
Type of the element.
Definition
JSONElement.h:17
tenduke::json::JSONString
JSON string element.
Definition
JSONString.h:14
tenduke::json::cjson::CjsonElement
cJSON-implementation of tenduke::json::JSONElement.
Definition
CJsonElement.h:14
tenduke::json::cjson::CjsonElement::element
cJSON * element
Pointer to the cJSON element.
Definition
CJsonElement.h:62
tenduke::json::cjson::CjsonElement::CjsonElement
CjsonElement(enum tenduke::json::JSONElement::Type type, cJSON *element, bool root)
Constructs new instance.
Definition
CJsonElement.h:22
tenduke::json::cjson::CjsonString
cJSON-implementation of tenduke::json::JSONString.
Definition
CJsonString.h:13
tenduke::json::cjson::CjsonString::asString
std::string asString() const override
Gets the value of the element as a string.
Definition
CJsonString.h:25
tenduke::json::cjson::CjsonString::getValue
std::string getValue() const override
Returns the value of this string.
Definition
CJsonString.h:29
tenduke::json::cjson::CjsonString::CjsonString
CjsonString(std::string value, cJSON *element)
Constructs new instance.
Definition
CJsonString.h:20
tenduke::json::cjson
Implementation of JSON service interfaces using cJSON.
Definition
CJsonArray.h:10
tenduke::json
JSON support.
Definition
JSONArray.h:10
tenduke
Root for classes, functions and globals of 10Duke C++ Client.
Definition
APIRequest.h:4
core
services
default
src
json
CJsonString.h
Generated by
1.17.0