CHROMA
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"),
19 
20  success &=theWaveStateTypeMap::Instance().registerPair(std::string("P_WAVE" ),
22 
23  success &=theWaveStateTypeMap::Instance().registerPair(std::string("D_WAVE" ),
25 
26  return success;
27  }
28 
29  const std::string typeIDString = "WaveStateType";
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 }
static T & Instance()
Definition: singleton.h:432
Wavetype enum.
void read(XMLReader &xml, const std::string &path, AsqtadFermActParams &param)
Read parameters.
void write(XMLWriter &xml, const std::string &path, const AsqtadFermActParams &param)
Writer parameters.
WaveStateType
Wave state type.
@ WAVE_TYPE_D_WAVE
@ WAVE_TYPE_P_WAVE
@ WAVE_TYPE_S_WAVE
int t
Definition: meslate.cc:37
const std::string typeIDString
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
::std::string string
Definition: gtest.h:1979