neoGFX
Cross-platform C++ app/game engine
i_system.hpp
Go to the documentation of this file.
1 // i_system.hpp
2 /*
3  neogfx C++ GUI Library
4  Copyright (c) 2018 Leigh Johnston. All Rights Reserved.
5 
6  This program is free software: you can redistribute it and / or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19 #pragma once
20 
21 #include <neogfx/neogfx.hpp>
22 #include <neolib/i_set.hpp>
23 #include <neolib/string.hpp>
24 #include <neogfx/game/ecs_ids.hpp>
26 
27 namespace neogfx::game
28 {
29  class i_system
30  {
31  public:
32  virtual ~i_system() = default;
33  public:
34  virtual const system_id& id() const = 0;
35  virtual const i_string& name() const = 0;
36  public:
37  virtual const neolib::i_set<component_id>& components() const = 0;
39  public:
40  virtual const i_component& component(component_id aComponentId) const = 0;
41  virtual const i_component& component(component_id aComponentId) = 0;
42  public:
43  virtual void apply() = 0;
44  virtual bool paused() const = 0;
45  virtual void pause() = 0;
46  virtual void resume() = 0;
47  virtual void terminate() = 0;
48  };
49 }
virtual const i_string & name() const =0
virtual ~i_system()=default
virtual void apply()=0
virtual void resume()=0
virtual void pause()=0
virtual void terminate()=0
virtual const system_id & id() const =0
virtual bool paused() const =0
virtual const i_component & component(component_id aComponentId) const =0
virtual const neolib::i_set< component_id > & components() const =0