CHROMA
enum_prop_dist_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_dist_io.h"
7 
8 #include <string>
9 
10 namespace Chroma {
11 
12  namespace PropDistTypeEnv {
13 
14  bool registerAll(void)
15  {
16  bool success = true;
17  success &= thePropDistTypeMap::Instance().registerPair(std::string("SRC"), PROP_DIST_TYPE_SOURCE);
18  success &= thePropDistTypeMap::Instance().registerPair(std::string("SNK"), PROP_DIST_TYPE_SOLUTION);
19  return success;
20  }
21 
23  const std::string typeIDString = "PropDistType";
24  }
25  using namespace PropDistTypeEnv;
26 
27  //! Reader
28  void read(XMLReader& xml_in, const std::string& path, PropDistType& t) {
29  thePropDistTypeMap::Instance().read(typeIDString, xml_in, path, t);
30  }
31 
32  //! Writer
33  void write(XMLWriter& xml_out, const std::string& path, const PropDistType& t) {
34  thePropDistTypeMap::Instance().write(typeIDString, xml_out, path, t);
35  }
36 
37  //! Reader
38  void read(BinaryReader& bin_in, PropDistType& t) {
40  }
41 
42  //! Writer
43  void write(BinaryWriter& bin_out, const PropDistType& t) {
44  thePropDistTypeMap::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.
PropDistType
Distillution line types.
@ PROP_DIST_TYPE_SOLUTION
@ PROP_DIST_TYPE_SOURCE
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