Horizon Official Technical Documentation
LUAComponent.hpp
Go to the documentation of this file.
1/***************************************************
2 * _ _ _ *
3 * | | | | (_) *
4 * | |_| | ___ _ __ _ _______ _ __ *
5 * | _ |/ _ \| '__| |_ / _ \| '_ \ *
6 * | | | | (_) | | | |/ / (_) | | | | *
7 * \_| |_/\___/|_| |_/___\___/|_| |_| *
8 ***************************************************
9 * This file is part of Horizon (c).
10 * Copyright (c) 2019 Sagun K. (sagunxp@gmail.com).
11 * Copyright (c) 2019 Horizon Dev Team.
12 *
13 * Base Author - Sagun K. (sagunxp@gmail.com)
14 *
15 * This library is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation, either version 3 of the License, or
18 * (at your option) any later version.
19 *
20 * This library is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this library. If not, see <http://www.gnu.org/licenses/>.
27 **************************************************/
28
29#ifndef HORIZON_ZONE_LUA_COMPONENT_HPP
30#define HORIZON_ZONE_LUA_COMPONENT_HPP
31
32#include <sol/sol.hpp>
33
34namespace Horizon
35{
36namespace Zone
37{
38class GameLogicProcess;
40{
41public:
43 LUAComponent(std::shared_ptr<GameLogicProcess> container) : _map_container_thread(container) { }
45
46 virtual void sync_definitions(std::shared_ptr<sol::state> state) = 0;
47 virtual void sync_data_types(std::shared_ptr<sol::state> state) = 0;
48 virtual void sync_functions(std::shared_ptr<sol::state> state) = 0;
49
50 std::shared_ptr<GameLogicProcess> get_container() { return _map_container_thread; }
51private:
52 std::shared_ptr<GameLogicProcess> _map_container_thread;
53};
54}
55}
56
57#endif /* HORIZON_ZONE_LUA_COMPONENT_HPP */
Definition: LUAComponent.hpp:40
virtual void sync_functions(std::shared_ptr< sol::state > state)=0
LUAComponent(std::shared_ptr< GameLogicProcess > container)
Definition: LUAComponent.hpp:43
std::shared_ptr< GameLogicProcess > _map_container_thread
Definition: LUAComponent.hpp:52
LUAComponent()
Definition: LUAComponent.hpp:42
virtual void sync_definitions(std::shared_ptr< sol::state > state)=0
~LUAComponent()
Definition: LUAComponent.hpp:44
std::shared_ptr< GameLogicProcess > get_container()
Definition: LUAComponent.hpp:50
virtual void sync_data_types(std::shared_ptr< sol::state > state)=0
Definition: Element.hpp:7