CHROMA
enum_proptype_io.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief PropType enum
4  */
5 #include "enum_proptype_io.h"
6 
7 #include <string>
8 
9 namespace Chroma {
10 
11  namespace PropTypeEnv {
12 
13  bool registerAll(void)
14  {
15  bool success;
16  success = thePropTypeMap::Instance().registerPair(std::string("SCIDAC"), PROP_TYPE_SCIDAC );
17  success &= thePropTypeMap::Instance().registerPair(std::string("SZIN"), PROP_TYPE_SZIN);
18  success &= thePropTypeMap::Instance().registerPair( std::string("KYU"), PROP_TYPE_KYU );
19 
20  return success;
21  }
22  const std::string typeIDString = "PropType";
24  }
25  using namespace PropTypeEnv;
26 
27  //! Read a propagator type enum
28  void read(XMLReader& xml_in, const std::string& path, PropType& t) {
29  thePropTypeMap::Instance().read(typeIDString,xml_in, path,t);
30  }
31 
32  //! Write a propagator type enum
33  void write(XMLWriter& xml_out, const std::string& path, const PropType& t) {
34  thePropTypeMap::Instance().write(typeIDString,xml_out, path, t);
35  }
36 }
static T & Instance()
Definition: singleton.h:432
PropType 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.
PropType
Propagator type.
@ PROP_TYPE_SCIDAC
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