EHS
JsonVar.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
ehs/EHS.h
"
4
#include "
ehs/Str.h
"
5
6
namespace
ehs
7
{
8
class
JsonBase;
9
class
JsonObj;
10
class
JsonArray;
11
class
JsonBool;
12
class
JsonNum;
13
class
JsonStr;
14
15
class
EHS_LIB_IO
JsonVar
final
16
{
17
private
:
18
UInt_64 hashId;
19
Str_8
id;
20
JsonBase
* value;
21
22
public
:
23
~JsonVar
();
24
25
JsonVar
();
26
27
JsonVar
(
Str_8
id
);
28
29
JsonVar
(
Str_8
id
,
const
JsonBase
*value);
30
31
JsonVar
(
Str_8
id
,
const
JsonBase
&value);
32
33
JsonVar
(
Str_8
id
,
const
JsonObj
&value);
34
35
JsonVar
(
Str_8
id
,
const
JsonArray
&value);
36
37
JsonVar
(
Str_8
id
,
const
JsonBool
&value);
38
39
JsonVar
(
Str_8
id
,
bool
boolean
);
40
41
JsonVar
(
Str_8
id
,
const
JsonNum
&value);
42
43
JsonVar
(
Str_8
id
, SInt_64 num);
44
45
JsonVar
(
Str_8
id
, UInt_64 num);
46
47
JsonVar
(
Str_8
id
,
SInt_32
num);
48
49
JsonVar
(
Str_8
id
,
UInt_32
num);
50
51
JsonVar
(
Str_8
id
,
SInt_16
num);
52
53
JsonVar
(
Str_8
id
,
UInt_16
num);
54
55
JsonVar
(
Str_8
id
,
SInt_8
num);
56
57
JsonVar
(
Str_8
id
,
UInt_8
num);
58
59
JsonVar
(
Str_8
id
,
double
num);
60
61
JsonVar
(
Str_8
id
,
float
num);
62
63
JsonVar
(
Str_8
id
,
const
JsonStr
&value);
64
65
JsonVar
(
Str_8
id
,
const
Char_8
*str, UInt_64 size = 0);
66
67
JsonVar
(
Str_8
id
,
Str_8
str);
68
69
JsonVar
(
JsonVar
&& var)
noexcept
;
70
71
JsonVar
(
const
JsonVar
& var);
72
73
JsonVar
& operator=(
JsonVar
&& var)
noexcept
;
74
75
JsonVar
& operator=(
const
JsonVar
& var);
76
77
UInt_64 GetHashId()
const
;
78
79
Str_8
GetId()
const
;
80
81
void
SetValue(
const
JsonBase
*newValue);
82
83
void
SetValue(
const
JsonBase
&newValue);
84
85
void
SetValue(
const
JsonObj
&newValue);
86
87
void
SetValue(
const
JsonArray
&newValue);
88
89
void
SetValue(
const
JsonBool
&newValue);
90
91
void
SetValue(
bool
newValue);
92
93
void
SetValue(
const
JsonNum
& newValue);
94
95
void
SetValue(
float
newValue);
96
97
void
SetValue(
const
JsonStr
& newValue);
98
99
void
SetValue(
const
Char_8
* newValue, UInt_64 size = 0);
100
101
void
SetValue(
const
Str_8
& newValue);
102
103
const
JsonBase
* GetValue()
const
;
104
105
JsonBase
* GetValue();
106
107
Str_8
ToStr(UInt_64 level,
bool
compact)
const
;
108
};
109
}
EHS.h
Str.h
ehs::JsonArray
Definition:
JsonArray.h:15
ehs::JsonBase
Definition:
JsonBase.h:19
ehs::JsonBool
Definition:
JsonBool.h:11
ehs::JsonNum
Definition:
JsonNum.h:11
ehs::JsonObj
Definition:
JsonObj.h:13
ehs::JsonStr
Definition:
JsonStr.h:11
ehs::JsonVar
Definition:
JsonVar.h:16
ehs::Str< Char_8, UInt_64 >
ehs
Definition:
Anchor.h:6
ehs::SInt_32
signed int SInt_32
Definition:
Types.h:50
ehs::UInt_32
unsigned int UInt_32
Definition:
Types.h:49
ehs::Char_8
char Char_8
Definition:
Types.h:40
ehs::UInt_8
unsigned char UInt_8
Definition:
Types.h:43
ehs::SInt_8
signed char SInt_8
Definition:
Types.h:44
ehs::UInt_16
unsigned short UInt_16
Definition:
Types.h:46
ehs::SInt_16
signed short SInt_16
Definition:
Types.h:47
include
ehs
json
JsonVar.h
Generated by
1.9.4