gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-252-gf9a3f78
a Global And Modular Bsm Inference Tool
baseprintermanager.hpp
Go to the documentation of this file.
1 // GAMBIT: Global and Modular BSM Inference Tool
2 // *********************************************
20 
21 #ifndef __baseprintermanager_hpp__
22 #define __baseprintermanager_hpp__
23 
24 #include <string>
27 
28 namespace Gambit
29 {
30  namespace Printers
31  {
33  class BaseBasePrinter;
34  class BaseBaseReader;
35 
38  {
39  private:
41  bool resume;
42 
43  public:
44  BasePrinterManager() : resume(false) {}
45  BasePrinterManager(bool r) : resume(r) {}
46 
48  bool resume_mode() { return resume; }
49 
52  void set_resume_mode(bool rflag) { resume = rflag; }
53 
55  virtual void new_stream(const std::string&, const Options&) = 0;
56 
58  virtual void new_reader(const std::string&, const Options&) = 0;
59 
61  virtual void create_resume_reader() = 0;
62 
64  virtual BaseBasePrinter* get_stream(const std::string& = "") = 0;
65 
67  virtual BaseBaseReader* get_reader(const std::string&) = 0;
68 
70  virtual void delete_stream(const std::string& = "") = 0;
71  virtual void delete_reader(const std::string&) = 0;
72 
74  virtual void finalise(bool abnormal=false) = 0;
75 
78  //#ifdef WITH_MPI
79  //bool Is_MPI_initialized() { return GMPI::Is_initialized(); }
80  //int getRank() { GMPI::Comm comm; return comm.Get_rank(); }
81  //#endif
82  };
83 
84 
85  }
86 }
87 
88 #endif
virtual void delete_stream(const std::string &="")=0
Delete reader and printer objects (does not harm output, just deletes the objects) ...
virtual BaseBaseReader * get_reader(const std::string &)=0
Getter for readers.
Declarations for the YAML options class.
virtual void finalise(bool abnormal=false)=0
Instruct printers that scan has finished and to perform cleanup.
virtual void new_stream(const std::string &, const Options &)=0
Create auxiliary printer object.
void set_resume_mode(bool rflag)
Setter for "resume" mode flag (printer may override user choice if no previous output exists) ...
bool resume
Flag for "resume" mode.
virtual void create_resume_reader()=0
Create for reader object for previous print output ("resume reader")
bool resume_mode()
Getter for "resume" mode flag.
START_MODEL dNur_CMB r
virtual BaseBasePrinter * get_stream(const std::string &="")=0
Getter for auxiliary printer objects.
A simple C++ wrapper for the MPI C bindings.
virtual void delete_reader(const std::string &)=0
Manager class for creating printer objects.
virtual void new_reader(const std::string &, const Options &)=0
Create reader object.
TODO: see if we can use this one:
Definition: Analysis.hpp:33
A small wrapper object for &#39;options&#39; nodes.