1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- /**
- * @file kernel/fddevs/Coordinator.hpp
- * @author The ARTIS Development Team
- * See the AUTHORS or Authors.txt file
- */
- /*
- * ARTIS - the multimodeling and simulation environment
- * This file is a part of the ARTIS environment
- *
- * Copyright (C) 2013-2019 ULCO http://www.univ-littoral.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 FDDEVS_COORDINATOR
- #define FDDEVS_COORDINATOR 1
- #include <artis-star/kernel/pdevs/Coordinator.hpp>
- namespace artis {
- namespace fddevs {
- template<class Time,
- class GraphManager,
- class Parameters = common::NoParameters,
- class GraphParameters = common::NoParameters>
- class Coordinator
- : public pdevs::Coordinator<Time, GraphManager, Parameters, GraphParameters> {
- public:
- Coordinator(const std::string& name, const Parameters& parameters,
- const GraphParameters& graph_parameters)
- :
- common::Model<Time>(name),
- pdevs::Coordinator<Time, GraphManager, Parameters, GraphParameters>(name,
- parameters, graph_parameters) { }
- virtual ~Coordinator() { }
- virtual std::string to_string(int level) const
- {
- std::ostringstream ss;
- ss << common::String::make_spaces(level * 2) << "fddevs coordinator \""
- << this->get_name() << "\":" << std::endl;
- ss << this->get_graph_manager().to_string(level + 1);
- return ss.str();
- }
- };
- }
- } // namespace artis fddevs
- #endif
|