gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-2191-ga4742ac
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 bool reader_exists(const std::string&) = 0;
71 
73  virtual void delete_stream(const std::string& = "") = 0;
74  virtual void delete_reader(const std::string&) = 0;
75 
77  virtual void finalise(bool abnormal=false) = 0;
78 
81  //#ifdef WITH_MPI
82  //bool Is_MPI_initialized() { return GMPI::Is_initialized(); }
83  //int getRank() { GMPI::Comm comm; return comm.Get_rank(); }
84  //#endif
85  };
86 
87 
88  }
89 }
90 
91 #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.
virtual bool reader_exists(const std::string &)=0
Checker for reader existence.