// src/backend/sgpemv2/simulation_observer.hh - Copyright 2005, 2006, University
//               of Padova, dept. of Pure and Applied
//               Mathematics
//
// This file is part of SGPEMv2.
//
// This is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// SGPEMv2 is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with SGPEMv2. If not, see http://www.gnu.org/licenses/.


#ifndef SIMULATION_OBSERVER_HH
#define SIMULATION_OBSERVER_HH 1

#include <sgpemv2/sgpemv2-visibility.hh>

namespace sgpem
{
  class Simulation;

  /// \brief This class instantiates the pattern observer for the target Simulation
  ///
  /// A SimulationObserver represents an entity which may register to a Simulation
  /// to get notifications when the state of the Simulation changes.
  class SimulationObserver;

  class SG_DLLEXPORT SimulationObserver
  {
  public:
    /// \brief Updates the observer with information provided by changed_simulation
    ///
    /// This method is called whenever the simulation decides that observers should
    /// be notified.
    /// \param changed_simulation the simulation which notifies an update.
    virtual void update(const Simulation& changed_simulation) = 0;

    /// \brief Standard virtual destructor.
    ///
    /// Standard virtual destructor.
    virtual ~SimulationObserver();

  }
  ; // class SimulationObserver

}//~ namespace sgpem

#endif //SIMULATION_OBSERVER_H


