CHROMA
enum_qdpvolfmt_io.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief QDP volfmt enum
4  */
5 #include "enum_qdpvolfmt_io.h"
6 
7 #include <string>
8 
9 namespace Chroma {
10 
11  namespace QDPVolfmtEnv {
12 
13  bool registerAll(void)
14  {
15  bool success;
16  success = theQDPVolfmtMap::Instance().registerPair(std::string("SINGLEFILE"), QDPIO_SINGLEFILE );
17  success &=theQDPVolfmtMap::Instance().registerPair(std::string("MULTIFILE"), QDPIO_MULTIFILE);
18  success &=theQDPVolfmtMap::Instance().registerPair(std::string("PARTFILE"), QDPIO_PARTFILE);
19 
20  return success;
21  }
22 
23  const std::string typeIDString = "QDP_volfmt_t";
24 
26  }
27  using namespace QDPVolfmtEnv;
28 
29  //! Read a QDP volume format type
30  void read(XMLReader& xml_in, const std::string& path, QDP_volfmt_t& t) {
31  theQDPVolfmtMap::Instance().read(typeIDString, xml_in, path,t);
32  }
33 
34  //! Write a QDP volume format type
35  void write(XMLWriter& xml_out, const std::string& path, const QDP_volfmt_t& t) {
36  theQDPVolfmtMap::Instance().write(typeIDString,xml_out, path, t);
37  }
38 }
static T & Instance()
Definition: singleton.h:432
QDP volfmt 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.
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