10Duke Enterprise C++ SDK
Toggle main menu visibility
Loading...
Searching...
No Matches
SimpleJSONBoolean.h
1
#ifndef TENDUKE_JSON_SIMPLEJSONBOOLEAN_H
2
#define TENDUKE_JSON_SIMPLEJSONBOOLEAN_H
3
4
#include "./SimpleJSONElement.h"
5
#include "json/JSONBoolean.h"
6
7
namespace
tenduke
{
namespace
json
{
8
9
class
SimpleJSONBoolean :
public
virtual
::tenduke::json::JSONBoolean
,
public
::tenduke::json::SimpleJSONElement
10
{
11
public
:
12
explicit
SimpleJSONBoolean(
bool
value)
13
: SimpleJSONElement(::tenduke::json::JSONElement::BOOLEAN), value(value)
14
{
15
}
16
17
std::string
asJSON
()
const override
18
{
19
return
(value ==
true
?
"true"
:
"false"
);
20
}
21
22
bool
getValue
()
const override
23
{
24
return
value;
25
}
26
27
private
:
28
bool
value;
29
};
30
31
}}
32
33
#endif
//TENDUKE_JSON_SIMPLEJSONBOOLEAN_H
tenduke::json::JSONBoolean
JSON boolean.
Definition
JSONBoolean.h:12
tenduke::json::SimpleJSONBoolean::getValue
bool getValue() const override
Returns the value.
Definition
SimpleJSONBoolean.h:22
tenduke::json::SimpleJSONBoolean::asJSON
std::string asJSON() const override
Serializes the element as JSON.
Definition
SimpleJSONBoolean.h:17
tenduke::json::SimpleJSONElement
Definition
SimpleJSONElement.h:11
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
common
src
json
SimpleJSONBoolean.h
Generated by
1.17.0