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
stream_io.hh
Go to the documentation of this file.
1
#ifndef CASM_support_enum_stream_io
2
#define CASM_support_enum_stream_io
3
4
#include "
casm/casm_io/enum/io_traits.hh
"
5
6
namespace
CASM
{
7
8
#define ENUM_IO_DECL(ENUM) \
9
std::ostream &operator<<(std::ostream &sout, const ENUM &val); \
10
\
11
std::istream &operator>>(std::istream &sin, ENUM &val);
12
13
#define ENUM_IO_DEF(ENUM) \
14
std::ostream &operator<<(std::ostream &sout, const ENUM &val) { \
15
sout << to_string<ENUM>(val); \
16
return sout; \
17
} \
18
\
19
std::istream &operator>>(std::istream &sin, ENUM &val) { \
20
std::string s; \
21
sin >> s; \
22
val = from_string<ENUM>(s); \
23
return sin; \
24
}
25
26
#define ENUM_IO_INLINE(ENUM) \
27
inline std::ostream &operator<<(std::ostream &sout, const ENUM &val) { \
28
sout << to_string<ENUM>(val); \
29
return sout; \
30
} \
31
\
32
inline std::istream &operator>>(std::istream &sin, ENUM &val) { \
33
std::string s; \
34
sin >> s; \
35
val = from_string<ENUM>(s); \
36
return sin; \
37
}
38
39
}
// namespace CASM
40
41
#endif
io_traits.hh
CASM
Main CASM namespace.
Definition:
APICommand.hh:8
include
casm
casm_io
enum
stream_io.hh
Generated on Tue Mar 23 2021 14:16:34 for CASM by
1.9.1