CHROMA
lib
io
enum_io
enum_wavetype_io.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
/*! \file
3
* \brief Wavetype enum
4
*/
5
#include "
enum_wavetype_io.h
"
6
7
#include <string>
8
9
namespace
Chroma
{
10
11
12
namespace
WaveStateTypeEnv {
13
14
bool
registerAll
(
void
)
15
{
16
bool
success;
17
success =
theWaveStateTypeMap::Instance
().registerPair(
std::string
(
"S_WAVE"
),
18
WAVE_TYPE_S_WAVE
);
19
20
success &=
theWaveStateTypeMap::Instance
().registerPair(
std::string
(
"P_WAVE"
),
21
WAVE_TYPE_P_WAVE
);
22
23
success &=
theWaveStateTypeMap::Instance
().registerPair(
std::string
(
"D_WAVE"
),
24
WAVE_TYPE_D_WAVE
);
25
26
return
success;
27
}
28
29
const
std::string
typeIDString
=
"WaveStateType"
;
30
bool
registered
=
registerAll
();
31
}
32
33
using namespace
WaveStateTypeEnv;
34
//! Read an WaveType enum
35
void
read
(XMLReader& xml_in,
const
std::string
& path,
WaveStateType
&
t
) {
36
theWaveStateTypeMap::Instance
().read(
typeIDString
, xml_in, path,
t
);
37
}
38
39
//! Write an WaveType enum
40
void
write
(XMLWriter& xml_out,
const
std::string
& path,
const
WaveStateType
&
t
) {
41
theWaveStateTypeMap::Instance
().write(
typeIDString
, xml_out, path,
t
);
42
}
43
}
Chroma::SingletonHolder::Instance
static T & Instance()
Definition:
singleton.h:432
enum_wavetype_io.h
Wavetype enum.
Chroma::read
void read(XMLReader &xml, const std::string &path, AsqtadFermActParams ¶m)
Read parameters.
Definition:
asqtad_fermact_params_s.cc:33
Chroma::write
void write(XMLWriter &xml, const std::string &path, const AsqtadFermActParams ¶m)
Writer parameters.
Definition:
asqtad_fermact_params_s.cc:40
Chroma::WaveStateType
WaveStateType
Wave state type.
Definition:
enum_wavetype_io.h:27
Chroma::WAVE_TYPE_D_WAVE
@ WAVE_TYPE_D_WAVE
Definition:
enum_wavetype_io.h:30
Chroma::WAVE_TYPE_P_WAVE
@ WAVE_TYPE_P_WAVE
Definition:
enum_wavetype_io.h:29
Chroma::WAVE_TYPE_S_WAVE
@ WAVE_TYPE_S_WAVE
Definition:
enum_wavetype_io.h:28
t
int t
Definition:
meslate.cc:37
Chroma::WaveStateTypeEnv::registerAll
bool registerAll(void)
Definition:
enum_wavetype_io.cc:14
Chroma::WaveStateTypeEnv::typeIDString
const std::string typeIDString
Definition:
enum_wavetype_io.cc:29
Chroma::WaveStateTypeEnv::registered
bool registered
Definition:
enum_wavetype_io.cc:30
Chroma
Asqtad Staggered-Dirac operator.
Definition:
klein_gord.cc:10
testing::internal::string
::std::string string
Definition:
gtest.h:1979
Generated by
1.9.1