CHROMA
enum_prop_line_io.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Type of lines for distillution
4  */
5 
6 #include "enum_prop_line_io.h"
7 
8 #include <string>
9 
10 namespace Chroma {
11 
12  namespace PropLineTypeEnv {
13 
14  bool registerAll(void)
15  {
16  bool success = true;
17  success &= thePropLineTypeMap::Instance().registerPair(std::string("CONN"), PROP_LINE_TYPE_CONN);
18  success &= thePropLineTypeMap::Instance().registerPair(std::string("DISC"), PROP_LINE_TYPE_DISC);
19  return success;
20  }
21 
23  const std::string typeIDString = "PropLineType";
24  }
25  using namespace PropLineTypeEnv;
26 
27  //! Reader
28  void read(XMLReader& xml_in, const std::string& path, PropLineType& t) {
29  thePropLineTypeMap::Instance().read(typeIDString, xml_in, path, t);
30  }
31 
32  //! Writer
33  void write(XMLWriter& xml_out, const std::string& path, const PropLineType& t) {
34  thePropLineTypeMap::Instance().write(typeIDString, xml_out, path, t);
35  }
36 
37  //! Reader
38  void read(BinaryReader& bin_in, PropLineType& t) {
40  }
41 
42  //! Writer
43  void write(BinaryWriter& bin_out, const PropLineType& t) {
44  thePropLineTypeMap::Instance().write(typeIDString, bin_out, t);
45  }
46 }
static T & Instance()
Definition: singleton.h:432
Type of lines for distillution.
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.
PropLineType
Distillution line types.
@ PROP_LINE_TYPE_DISC
@ PROP_LINE_TYPE_CONN
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