CASM
1.1.0
A Clusters Approach to Statistical Mechanics
Main Page
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Variables
Typedefs
_
a
b
c
d
e
f
g
i
l
m
o
p
r
s
t
u
v
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Typedefs
a
b
c
d
e
f
h
i
k
l
m
n
o
p
q
r
s
t
u
v
x
Enumerations
Enumerator
a
b
c
d
e
f
h
i
n
o
p
q
r
s
v
Related Functions
Files
File List
File Members
All
a
b
c
d
e
h
i
j
l
m
o
p
q
r
s
t
v
Functions
c
m
o
q
Variables
Typedefs
Macros
a
c
e
h
i
t
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
json_io.hh
Go to the documentation of this file.
1
#ifndef CASM_support_enum_json_io
2
#define CASM_support_enum_json_io
3
4
#include "
casm/casm_io/enum/io_traits.hh
"
5
6
namespace
CASM
{
7
8
class
jsonParser;
9
10
#define ENUM_JSON_IO_DECL(ENUM) \
11
jsonParser &to_json(const ENUM &val, jsonParser &json); \
12
\
13
void from_json(ENUM &val, const jsonParser &json);
14
15
#define ENUM_JSON_IO_DEF(ENUM) \
16
jsonParser &to_json(const ENUM &val, jsonParser &json) { \
17
return to_json(to_string<ENUM>(val), json); \
18
} \
19
\
20
void from_json(ENUM &val, const jsonParser &json) { \
21
val = from_string<ENUM>(json.get<std::string>()); \
22
}
23
24
#define ENUM_JSON_IO_INLINE(ENUM) \
25
inline jsonParser &to_json(const ENUM &val, jsonParser &json) { \
26
return to_json(to_string<ENUM>(val), json); \
27
} \
28
\
29
inline void from_json(ENUM &val, const jsonParser &json) { \
30
val = from_string<ENUM>(json.get<std::string>()); \
31
}
32
33
}
// namespace CASM
34
35
#endif
io_traits.hh
CASM
Main CASM namespace.
Definition:
APICommand.hh:8
include
casm
casm_io
enum
json_io.hh
Generated on Tue Mar 23 2021 14:16:34 for CASM by
1.9.1