SSAGES  0.8.3
Software Suite for Advanced General Ensemble Simulations
EventListener.h
1 
21 #pragma once
22 
23 #include "types.h"
24 
25 namespace SSAGES
26 {
27  // Forward declare.
28  class Snapshot;
29 
31 
35  {
36  private:
37  unsigned int frequency_;
38 
39  public:
41 
44  EventListener(unsigned int frequency) :
45  frequency_(frequency)
46  {
47  }
48 
50 
53  unsigned int GetFrequency() const { return frequency_; }
54 
56 
62  virtual void PreSimulation(Snapshot* snapshot, const class CVManager& cvmanager) = 0;
63 
65 
71  virtual void PostIntegration(Snapshot* snapshot, const class CVManager& cvmanager) = 0;
72 
74 
80  virtual void PostSimulation(Snapshot* snapshot, const class CVManager& cvmanager) = 0;
81 
83  virtual ~EventListener() {}
84  };
85 }
Base abstract class for listening in to events fired by "Hook".
Definition: EventListener.h:34
Collective variable manager.
Definition: CVManager.h:40
EventListener(unsigned int frequency)
Constructor.
Definition: EventListener.h:44
Class containing a snapshot of the current simulation in time.
Definition: Snapshot.h:43
virtual void PostIntegration(Snapshot *snapshot, const class CVManager &cvmanager)=0
Method call post integration.
unsigned int GetFrequency() const
Get frequency of event listener.
Definition: EventListener.h:53
unsigned int frequency_
Frequency for listening.
Definition: EventListener.h:37
virtual void PostSimulation(Snapshot *snapshot, const class CVManager &cvmanager)=0
Method call post simulation.
virtual void PreSimulation(Snapshot *snapshot, const class CVManager &cvmanager)=0
Method call prior to simulation initiation.
virtual ~EventListener()
Destructor.
Definition: EventListener.h:83