Simulator.hpp 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /**
  2. * @file Simulator.hpp
  3. * @author The PARADEVS Development Team
  4. * See the AUTHORS or Authors.txt file
  5. */
  6. /*
  7. * PARADEVS - the multimodeling and simulation environment
  8. * This file is a part of the PARADEVS environment
  9. *
  10. * Copyright (C) 2013 ULCO http://www.univ-litoral.fr
  11. *
  12. * This program is free software: you can redistribute it and/or modify
  13. * it under the terms of the GNU General Public License as published by
  14. * the Free Software Foundation, either version 3 of the License, or
  15. * (at your option) any later version.
  16. *
  17. * This program is distributed in the hope that it will be useful,
  18. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. * GNU General Public License for more details.
  21. *
  22. * You should have received a copy of the GNU General Public License
  23. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  24. */
  25. #ifndef COMMON_SIMULATOR
  26. #define COMMON_SIMULATOR 1
  27. #include <common/Model.hpp>
  28. namespace paradevs { namespace common {
  29. template < class Time >
  30. class Simulator : public Model < Time >
  31. {
  32. public :
  33. Simulator(const std::string& name) : Model < Time >(name)
  34. { }
  35. virtual ~Simulator()
  36. { }
  37. virtual void observation(std::ostream& file) const =0;
  38. virtual void output(typename Time::type t) =0;
  39. virtual void post_event(typename Time::type t,
  40. const common::ExternalEvent < Time >& event) = 0;
  41. virtual typename Time::type start(typename Time::type t) =0;
  42. virtual typename Time::type transition(typename Time::type t) =0;
  43. };
  44. } } // namespace paradevs common
  45. #endif