Przeglądaj źródła

Remove EventTable class in pdevs namespace

Eric Ramat 11 lat temu
rodzic
commit
039928ae7f

+ 2 - 2
src/pdevs/CMakeLists.txt

@@ -9,10 +9,10 @@ LINK_DIRECTORIES(
   ${GLIBMM_LIBRARY_DIRS}
   ${LIBXML_LIBRARY_DIR})
 
-SET(PDEVS_CPP Coordinator.cpp Dynamics.cpp EventTable.cpp RootCoordinator.cpp
+SET(PDEVS_CPP Coordinator.cpp Dynamics.cpp RootCoordinator.cpp
   Simulator.cpp)
 
-SET(PDEVS_HPP Coordinator.hpp Dynamics.hpp EventTable.hpp RootCoordinator.hpp
+SET(PDEVS_HPP Coordinator.hpp Dynamics.hpp RootCoordinator.hpp
   Simulator.hpp)
 
 ADD_LIBRARY(pdevs SHARED ${PDEVS_CPP};${PDEVS_HPP})

+ 2 - 3
src/pdevs/Coordinator.hpp

@@ -27,10 +27,9 @@
 #ifndef PDEVS_COORDINATOR
 #define PDEVS_COORDINATOR 1
 
-#include <pdevs/EventTable.hpp>
-
 #include <common/Bag.hpp>
 #include <common/Coordinator.hpp>
+#include <common/EventTable.hpp>
 #include <common/Links.hpp>
 #include <common/ExternalEvent.hpp>
 #include <common/Node.hpp>
@@ -63,7 +62,7 @@ public:
 private:
     common::Links      _link_list;
     common::Models     _child_list;
-    pdevs::EventTable  _event_table;
+    common::EventTable _event_table;
 };
 
 } } // namespace paradevs pdevs

+ 0 - 49
src/pdevs/EventTable.cpp

@@ -1,49 +0,0 @@
-/**
- * @file EventTable.cpp
- * @author The PARADEVS Development Team
- * See the AUTHORS or Authors.txt file
- */
-
-/*
- * PARADEVS - the multimodeling and simulation environment
- * This file is a part of the PARADEVS environment
- *
- * Copyright (C) 2013 ULCO http://www.univ-litoral.fr
- *
- * This program 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.
- *
- * This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <pdevs/EventTable.hpp>
-
-#include <algorithm>
-#include <sstream>
-
-namespace paradevs { namespace pdevs {
-
-common::Models EventTable::get_current_models(common::Time time) const
-{
-    common::Models models;
-    bool found = true;
-
-    for (const_reverse_iterator it = rbegin(); found and it != rend(); ++it) {
-        if (it->get_time() == time) {
-            models.push_back(it->get_model());
-        } else {
-            found = false;
-        }
-    }
-    return models;
-}
-
-} } // namespace paradevs pdevs

+ 0 - 48
src/pdevs/EventTable.hpp

@@ -1,48 +0,0 @@
-/**
- * @file EventTable.hpp
- * @author The PARADEVS Development Team
- * See the AUTHORS or Authors.txt file
- */
-
-/*
- * PARADEVS - the multimodeling and simulation environment
- * This file is a part of the PARADEVS environment
- *
- * Copyright (C) 2013 ULCO http://www.univ-litoral.fr
- *
- * This program 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.
- *
- * This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef PDEVS_EVENT_TABLE
-#define PDEVS_EVENT_TABLE 1
-
-#include <common/EventTable.hpp>
-#include <common/Model.hpp>
-
-namespace paradevs { namespace pdevs {
-
-class EventTable : public common::EventTable
-{
-public:
-    EventTable()
-    { }
-    virtual ~EventTable()
-    { }
-
-    common::Models get_current_models(common::Time time) const;
-};
-
-} } // namespace paradevs pdevs
-
-#endif