diff options
author | ancarola <raffaele.ancarola@epfl.ch> | 2019-01-25 23:47:41 +0100 |
---|---|---|
committer | ancarola <raffaele.ancarola@epfl.ch> | 2019-01-25 23:47:41 +0100 |
commit | 351f83b6d331eef1fb5e1cbfa8bed25da8f96a57 (patch) | |
tree | 2a7ac7dc499f5b764caba981002e7a17bc1687d0 /engine/include | |
parent | Core channel in flatland and signal test (diff) | |
download | flatland-351f83b6d331eef1fb5e1cbfa8bed25da8f96a57.tar.gz flatland-351f83b6d331eef1fb5e1cbfa8bed25da8f96a57.zip |
Template error on compile signal test
Diffstat (limited to 'engine/include')
-rw-r--r-- | engine/include/bound.hpp | 2 | ||||
-rw-r--r-- | engine/include/collector.hpp | 4 | ||||
-rw-r--r-- | engine/include/component.hpp | 4 | ||||
-rw-r--r-- | engine/include/core/signal.hpp | 7 | ||||
-rw-r--r-- | engine/include/flatland.hpp | 2 | ||||
-rw-r--r-- | engine/include/serial/focusable.hpp | 4 | ||||
-rw-r--r-- | engine/include/surface.hpp | 4 | ||||
-rw-r--r-- | engine/include/types.hpp | 5 | ||||
-rw-r--r-- | engine/include/window.hpp | 4 |
9 files changed, 17 insertions, 19 deletions
diff --git a/engine/include/bound.hpp b/engine/include/bound.hpp index 9b7b755..a924e90 100644 --- a/engine/include/bound.hpp +++ b/engine/include/bound.hpp @@ -8,7 +8,7 @@ namespace flat { typedef SVector<int, 2> pixel; -class FlatBound : virtual public flat::core::object +class FlatBound : virtual public flat::object { pixel location; diff --git a/engine/include/collector.hpp b/engine/include/collector.hpp index bc50f4d..45a3e74 100644 --- a/engine/include/collector.hpp +++ b/engine/include/collector.hpp @@ -1,12 +1,12 @@ #ifndef __FLATCOLLECTOR_H__ #define __FLATCOLLECTOR_H__ -#include "core/object.hpp" +#include "object.hpp" #include <set> namespace flat { -class FlatCollector : virtual public flat::core::object +class FlatCollector : virtual public flat::object { FlatCollector * parent; diff --git a/engine/include/component.hpp b/engine/include/component.hpp index 4ad99c8..fdde28d 100644 --- a/engine/include/component.hpp +++ b/engine/include/component.hpp @@ -1,13 +1,13 @@ #ifndef __FLAT_COMPONENT_H__ #define __FLAT_COMPONENT_H__ -#include "core/object.hpp" +#include "object.hpp" #include "core/labelled.hpp" #include <string> namespace flat { -class component : virtual public core::object, virtual public core::labelled +class component : virtual public object, virtual public core::labelled { component * m_parent; diff --git a/engine/include/core/signal.hpp b/engine/include/core/signal.hpp index 7d91150..a420989 100644 --- a/engine/include/core/signal.hpp +++ b/engine/include/core/signal.hpp @@ -6,6 +6,7 @@ #include <initializer_list> #include "task.hpp" #include "types.hpp" +#include "object.hpp" #include <functional> #include <memory> #include "priority.hpp" @@ -13,7 +14,7 @@ namespace flat { - class object; + //class object; namespace core { @@ -30,7 +31,7 @@ namespace flat template<class T> T * get() { - return dynamic_cast<T>(data); + return reinterpret_cast<T*>(data); } void * data; @@ -123,7 +124,7 @@ namespace flat template<typename R, typename T> inline listener::ptr connect(R T::*mf, T& obj, const std::initializer_list<std::string>& filters = {}) { - return connect(std::bind(mf, obj)); + return connect(std::bind(mf, obj), filters); } static ptr find(const std::string&); diff --git a/engine/include/flatland.hpp b/engine/include/flatland.hpp index c0216d8..0ccf59c 100644 --- a/engine/include/flatland.hpp +++ b/engine/include/flatland.hpp @@ -36,7 +36,7 @@ struct flat_status }; int init_flatland(FlatWindow*, const flat_status&, float fps = 60); -void quit_flatland(); +void quit(); namespace core { diff --git a/engine/include/serial/focusable.hpp b/engine/include/serial/focusable.hpp index f139577..8a05051 100644 --- a/engine/include/serial/focusable.hpp +++ b/engine/include/serial/focusable.hpp @@ -1,14 +1,14 @@ #ifndef __FOCUSABLE_H__ #define __FOCUSABLE_H__ -#include "core/object.hpp" +#include "object.hpp" #include "types.hpp" union SDL_Event; namespace flat { -class Focusable : virtual public flat::core::object +class Focusable : virtual public flat::object { bool focused; diff --git a/engine/include/surface.hpp b/engine/include/surface.hpp index 5364e8e..6e9026a 100644 --- a/engine/include/surface.hpp +++ b/engine/include/surface.hpp @@ -1,13 +1,13 @@ #ifndef __FLATSURFACE_H__ #define __FLATSURFACE_H__ -#include "core/object.hpp" +#include "object.hpp" #include "core/labelled.hpp" #include <SDL2/SDL.h> namespace flat { -class surface : virtual public core::object, virtual public core::labelled +class surface : virtual public object, virtual public core::labelled { SDL_Surface * sdl_surface; SDL_Surface * parent; diff --git a/engine/include/types.hpp b/engine/include/types.hpp index e7a1d3a..31596c9 100644 --- a/engine/include/types.hpp +++ b/engine/include/types.hpp @@ -5,10 +5,7 @@ namespace flat { - namespace core - { - class object; - } + class object; class FlatActor; class FlatSprite; diff --git a/engine/include/window.hpp b/engine/include/window.hpp index 98e8e04..48e8cb0 100644 --- a/engine/include/window.hpp +++ b/engine/include/window.hpp @@ -1,7 +1,7 @@ #ifndef __FLATWINDOW_H__ #define __FLATWINDOW_H__ -#include "core/object.hpp" +#include "object.hpp" #include "serial/keyfocusable.hpp" #include <string> @@ -37,7 +37,7 @@ struct window_status class FlatLayer; -class FlatWindow : virtual public core::object, public KeyFocusable +class FlatWindow : virtual public object, public KeyFocusable { std::string title; window_status status; |