OpenMPCD
CUDA/MPCSolute/Instrumentation/Base.hpp
Go to the documentation of this file.
1 /**
2  * @file
3  * Defines the OpenMPCD::CUDA::MPCSolute::Instrumentation::Base class.
4  */
5 
6 #ifndef OPENMPCD_CUDA_MPCSOLUTE_INSTRUMENTATION_BASE_HPP
7 #define OPENMPCD_CUDA_MPCSOLUTE_INSTRUMENTATION_BASE_HPP
8 
9 #include <string>
10 
11 namespace OpenMPCD
12 {
13 namespace CUDA
14 {
15 namespace MPCSolute
16 {
17 /**
18  * Namespace for instrumentation classes for MPC solutes.
19  */
20 namespace Instrumentation
21 {
22  /**
23  * Base class for MPC solutes instrumentation.
24  */
25  class Base
26  {
27  protected:
28  /**
29  * The constructor.
30  */
31  Base()
32  {
33  }
34 
35  private:
36  Base(const Base&); ///< The copy constructor.
37 
38  public:
39  /**
40  * The destructor.
41  */
42  virtual ~Base()
43  {
44  }
45 
46  public:
47  /**
48  * Performs measurements.
49  */
50  void measure()
51  {
52 
54  }
55 
56  /**
57  * Saves the data to the given run directory.
58  * @param[in] rundir The path to the run directory.
59  */
60  void save(const std::string& rundir) const
61  {
62 
63  saveSpecific(rundir);
64  }
65 
66  protected:
67  /**
68  * Performs measurements specific to the solute type.
69  */
70  virtual void measureSpecific() = 0;
71 
72  /**
73  * Saves measurements specific to the solute type.
74  * @param[in] rundir The path to the run directory.
75  */
76  virtual void saveSpecific(const std::string& rundir) const = 0;
77 
78  private:
79  Base& operator=(const Base&); ///< The assignment operator.
80 
81  };
82 } //namespace Instrumentation
83 } //namespace MPCSolute
84 } //namespace CUDA
85 } //namespace OpenMPCD
86 
87 #endif
OpenMPCD::CUDA::MPCSolute::Instrumentation::Base::~Base
virtual ~Base()
The destructor.
Definition: CUDA/MPCSolute/Instrumentation/Base.hpp:42
OpenMPCD::CUDA::MPCSolute::Instrumentation::Base::measureSpecific
virtual void measureSpecific()=0
Performs measurements specific to the solute type.
OpenMPCD::CUDA::MPCSolute::Instrumentation::Base
Base class for MPC solutes instrumentation.
Definition: CUDA/MPCSolute/Instrumentation/Base.hpp:25
OpenMPCD::CUDA::MPCSolute::Instrumentation::Base::save
void save(const std::string &rundir) const
Saves the data to the given run directory.
Definition: CUDA/MPCSolute/Instrumentation/Base.hpp:60
OpenMPCD::CUDA::MPCSolute::Instrumentation::Base::measure
void measure()
Performs measurements.
Definition: CUDA/MPCSolute/Instrumentation/Base.hpp:50
OpenMPCD::CUDA::Instrumentation
Class doing measurements in a CUDA simulation.
Definition: Instrumentation.hpp:26
OpenMPCD::CUDA::MPCSolute::Instrumentation::Base::Base
Base()
The constructor.
Definition: CUDA/MPCSolute/Instrumentation/Base.hpp:31
OpenMPCD::CUDA::MPCSolute::Instrumentation::Base::saveSpecific
virtual void saveSpecific(const std::string &rundir) const =0
Saves measurements specific to the solute type.