From 543269316904afccbf6da7222596c942b825885b Mon Sep 17 00:00:00 2001 From: matrevis Date: Fri, 18 Aug 2006 01:04:28 +0000 Subject: [PATCH] - I forgot to add two files and remove a debug print. - Actually there is some printing issue to fix, but the logics works fine. git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@902 3ecf2c5c-341e-0410-92b4-d18e462d057c --- src/backend/concrete_simulation.cc | 1 - src/backend/simulation_observer.cc | 25 +++++++++++++++++ src/backend/simulation_observer.hh | 44 ++++++++++++++++++++++++++++++ 3 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 src/backend/simulation_observer.cc create mode 100644 src/backend/simulation_observer.hh diff --git a/src/backend/concrete_simulation.cc b/src/backend/concrete_simulation.cc index e653639..cfc0d65 100644 --- a/src/backend/concrete_simulation.cc +++ b/src/backend/concrete_simulation.cc @@ -94,7 +94,6 @@ ConcreteSimulation::jump_to(History::position p) if (!yet_to_finish) stop(); - _history.get_size() << std::endl; _front = p < _front ? p : _front; notify_change(); } diff --git a/src/backend/simulation_observer.cc b/src/backend/simulation_observer.cc new file mode 100644 index 0000000..b12ef8c --- /dev/null +++ b/src/backend/simulation_observer.cc @@ -0,0 +1,25 @@ +// src/backend/simulation_observer.cc - 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 2 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, write to the Free Software +// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +#include "simulation_observer.hh" + +sgpem::SimulationObserver::~SimulationObserver() {} + +// Pure abstract class. Nothing else to put here. diff --git a/src/backend/simulation_observer.hh b/src/backend/simulation_observer.hh new file mode 100644 index 0000000..48f3aeb --- /dev/null +++ b/src/backend/simulation_observer.hh @@ -0,0 +1,44 @@ +// src/backend/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 2 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, write to the Free Software +// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +#ifndef SIMULATION_OBSERVER_HH +#define SIMULATION_OBSERVER_HH 1 + +#include "config.h" + +namespace sgpem +{ + class Simulation; + class SimulationObserver; + + class SG_DLLEXPORT SimulationObserver + { + public: + virtual void update(const Simulation& changed_simulation) = 0; + virtual ~SimulationObserver(); + + } + ; // class SimulationObserver + +}//~ namespace sgpem + +#endif //SIMULATION_OBSERVER_H + +