CASM  1.1.0
A Clusters Approach to Statistical Mechanics
stream_io.hh File Reference

Go to the source code of this file.

Namespaces

 CASM
 Main CASM namespace.
 

Macros

#define ENUM_IO_DECL(ENUM)
 
#define ENUM_IO_DEF(ENUM)
 
#define ENUM_IO_INLINE(ENUM)
 

Macro Definition Documentation

◆ ENUM_IO_DECL

#define ENUM_IO_DECL (   ENUM)
Value:
std::ostream &operator<<(std::ostream &sout, const ENUM &val); \
\
std::istream &operator>>(std::istream &sin, ENUM &val);
std::istream & operator>>(std::istream &_in, std::vector< T > &vec)
Definition: stream_io.hh:10
ostream & operator<<(ostream &out, const vector< T > &vec)
Definition: stream_io.hh:26

Definition at line 8 of file stream_io.hh.

◆ ENUM_IO_DEF

#define ENUM_IO_DEF (   ENUM)
Value:
std::ostream &operator<<(std::ostream &sout, const ENUM &val) { \
sout << to_string<ENUM>(val); \
return sout; \
} \
\
std::istream &operator>>(std::istream &sin, ENUM &val) { \
std::string s; \
sin >> s; \
val = from_string<ENUM>(s); \
return sin; \
}
std::set< std::string > & s

Definition at line 13 of file stream_io.hh.

◆ ENUM_IO_INLINE

#define ENUM_IO_INLINE (   ENUM)
Value:
inline std::ostream &operator<<(std::ostream &sout, const ENUM &val) { \
sout << to_string<ENUM>(val); \
return sout; \
} \
\
inline std::istream &operator>>(std::istream &sin, ENUM &val) { \
std::string s; \
sin >> s; \
val = from_string<ENUM>(s); \
return sin; \
}

Definition at line 26 of file stream_io.hh.