genericIO
ioModes.h
1 #ifndef IOMODES
2 #define IOMODES 1
3 #include "genericIO.h"
4 #include "jsonGenericIO.h"
5 #include<mutex>
6 namespace SEP{
7 class ioModes{
8  public:
9  ioModes(){;}
10  ioModes(const int argc, char **argv){ setup(argc,argv);}
11  void setup(const int argc, char**argv);
12  std::shared_ptr<genericIO> getDefaultIO();
13  std::shared_ptr<genericIO> getIO(const std::string &def);
14  std::shared_ptr<genericRegFile> getRegFileTag(const std::string &tag,const std::string &def,const std::string &name,const usage_code usage);
15  std::shared_ptr<genericRegFile> getGenericRegFile(const std::string &name,const usage_code usage);
16  std::string getDefaultType(){ return _defaultType;}
17  private:
18  std::shared_ptr<genericIO> _defaultIO;
19  std::map<std::string,std::shared_ptr<genericIO>> _ios;
20 
21  std::shared_ptr<paramObj> _par;
22  std::string _defaultType;
23 
24 };
25 
27  private:
28 
29 
30  ioModesFortran(){;}
31  ioModesFortran(const ioModesFortran& rs);
32  ioModesFortran& operator = (const ioModesFortran& rs);
33  static std::shared_ptr<ioModesFortran> instance;
34 
35  std::shared_ptr<ioModes> _io;
36  public:
37  void setup( const int argc,char **argv);
38  ~ioModesFortran(){;}
39  std::shared_ptr<ioModes> getIOModes(){
40  return _io;
41  }
42 
43  static std::shared_ptr<ioModesFortran>& getInstance()
44  {
45 
46 
47 
48  if (!instance) {
49  instance.reset(new ioModesFortran());
50  instance->_io.reset(new ioModes());
51  }
52 
53  return instance;
54  }
55 
56 };
57 }
58 
59 #endif
Definition: ioModes.h:26
Definition: ioModes.h:7
Definition: axis.h:8