neoGFX
Cross-platform C++ app/game engine
i_entity_archetype.hpp
Go to the documentation of this file.
1 // i_entity_archetype.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 
20 #pragma once
21 
22 #include <neogfx/neogfx.hpp>
23 #include <neolib/set.hpp>
24 #include <neolib/allocator.hpp>
25 #include <neolib/uuid.hpp>
26 #include <neolib/string.hpp>
27 #include <neogfx/game/ecs_ids.hpp>
28 
29 namespace neogfx::game
30 {
31  class i_ecs;
32 
34  {
35  public:
36  virtual const entity_archetype_id& id() const = 0;
37  virtual const i_string& name() const = 0;
38  virtual const neolib::i_set<component_id>& components() const = 0;
40  virtual void populate_default_components(i_ecs& aEcs, entity_id aEntity) = 0;
41  };
42 }
virtual const entity_archetype_id & id() const =0
virtual const neolib::i_set< component_id > & components() const =0
id_t entity_id
Definition: ecs_ids.hpp:34
virtual const i_string & name() const =0
virtual void populate_default_components(i_ecs &aEcs, entity_id aEntity)=0