Stride Reference Manual  - generated for commit 9643b11
CliViewer.h
Go to the documentation of this file.
1 #pragma once
2 /*
3  * This is free software: you can redistribute it and/or modify it
4  * under the terms of the GNU General Public License as published by
5  * the Free Software Foundation, either version 3 of the License, or
6  * any later version.
7  * The software is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  * You should have received a copy of the GNU General Public License
12  * along with the software. If not, see <http://www.gnu.org/licenses/>.
13  *
14  * Copyright 2018, Kuylen E, Willem L, Broeckhove J
15  */
16 
22 #include "sim/event/Id.h"
23 
24 #include <spdlog/spdlog.h>
25 
26 namespace stride {
27 
28 class SimRunner;
29 
30 namespace viewers {
31 
33 class CliViewer
34 {
35 public:
37  CliViewer(std::shared_ptr<SimRunner> runner, std::shared_ptr<spdlog::logger> logger)
38  : m_logger(std::move(logger)), m_runner(std::move(runner))
39  {
40  }
41 
43  void Update(sim_event::Id id);
44 
45 private:
46  std::shared_ptr<spdlog::logger> m_logger;
47  std::shared_ptr<SimRunner> m_runner;
48 };
49 
50 } // namespace viewers
51 } // namespace stride
CliViewer(std::shared_ptr< SimRunner > runner, std::shared_ptr< spdlog::logger > logger)
Instantiate cli viewer.
Definition: CliViewer.h:37
void Update(sim_event::Id id)
Let viewer perform update.
Definition: CliViewer.cpp:39
Id
Enumerates the event.
Definition: Id.h:30
STL namespace.
Viewer of Simulator for commandline interface.
Definition: CliViewer.h:33
std::shared_ptr< SimRunner > m_runner
Definition: CliViewer.h:47
Namespace for the simulator and related classes.
Definition: Calendar.cpp:28
Definition of EventId.
std::shared_ptr< spdlog::logger > m_logger
Definition: CliViewer.h:46