diff options
author | ancarola <raffaele.ancarola@epfl.ch> | 2019-01-23 21:03:02 +0100 |
---|---|---|
committer | ancarola <raffaele.ancarola@epfl.ch> | 2019-01-23 21:03:02 +0100 |
commit | 10fe93d8c1d6a06b38cad2b491e99833ffe867f1 (patch) | |
tree | 7c0139faf569f6d540c86fb8a2b1699b42d75b54 /engine/include | |
parent | Labelled, signal (diff) | |
download | flatland-10fe93d8c1d6a06b38cad2b491e99833ffe867f1.tar.gz flatland-10fe93d8c1d6a06b38cad2b491e99833ffe867f1.zip |
Signal finalized?
Diffstat (limited to 'engine/include')
-rw-r--r-- | engine/include/core/labelled.hpp | 2 | ||||
-rw-r--r-- | engine/include/core/signal.hpp | 10 | ||||
-rw-r--r-- | engine/include/flatcollector.h | 2 | ||||
-rw-r--r-- | engine/include/flatcomponent.h | 5 | ||||
-rw-r--r-- | engine/include/flatland.h | 6 | ||||
-rw-r--r-- | engine/include/flatsurface.h | 2 | ||||
-rw-r--r-- | engine/include/flatwindow.h | 2 |
7 files changed, 15 insertions, 14 deletions
diff --git a/engine/include/core/labelled.hpp b/engine/include/core/labelled.hpp index 7363e8d..8b458b3 100644 --- a/engine/include/core/labelled.hpp +++ b/engine/include/core/labelled.hpp @@ -19,7 +19,7 @@ struct flat::core::labelled { const std::string label; - labelled(const std::string& label = ""); + labelled(const std::string& label = "", bool allow_null = false); static std::string random_label(uint8_t length = 8); }; diff --git a/engine/include/core/signal.hpp b/engine/include/core/signal.hpp index 4270aa5..be1644a 100644 --- a/engine/include/core/signal.hpp +++ b/engine/include/core/signal.hpp @@ -6,7 +6,7 @@ #include <initializer_list> #include "object.hpp" #include "task.hpp" -#include "types.h" +#include "types.hpp" #include <functional> #include <memory> #include "priority.hpp" @@ -110,11 +110,11 @@ namespace flat void invoke(const signal&); - /* Allow to safely bind e functor */ + /* Allow to safely bind a functor */ template<class T> - static ptr make( const (T::*method(const object*, void*))& fct, - T* obj, - const std::initializer_list<std::string>& filters = {}) + static ptr create( const (T::*method(const object*, void*))& fct, + T* obj, + const std::initializer_list<std::string>& filters = {}) { return new listener(std::bind(fct, ptr), filters); } diff --git a/engine/include/flatcollector.h b/engine/include/flatcollector.h index d7edf55..5b1e718 100644 --- a/engine/include/flatcollector.h +++ b/engine/include/flatcollector.h @@ -1,7 +1,7 @@ #ifndef __FLATCOLLECTOR_H__ #define __FLATCOLLECTOR_H__ -#include "object.hpp" +#include "core/object.hpp" #include <set> class FlatCollector : virtual public flat::core::object diff --git a/engine/include/flatcomponent.h b/engine/include/flatcomponent.h index 807bcaa..881e34f 100644 --- a/engine/include/flatcomponent.h +++ b/engine/include/flatcomponent.h @@ -1,10 +1,11 @@ #ifndef __FLAT_COMPONENT_H__ #define __FLAT_COMPONENT_H__ -#include "object.hpp" +#include "core/object.hpp" +#include "core/labelled.hpp" #include <string> -class Component : virtual public flat::core::object +class Component : virtual public flat::core::object, virtual public flat::core::labelled { Component * parent; diff --git a/engine/include/flatland.h b/engine/include/flatland.h index c5f3eb5..e01201f 100644 --- a/engine/include/flatland.h +++ b/engine/include/flatland.h @@ -49,12 +49,12 @@ namespace core { /* Engine channels */ -channel& core_chan(); -channel& error_chan(); +core::channel& core_chan(); +core::channel& error_chan(); /* Main job access */ -job& game_job(); +core::job& game_job(); /* Window and status accessors */ diff --git a/engine/include/flatsurface.h b/engine/include/flatsurface.h index 3b64734..fff07dd 100644 --- a/engine/include/flatsurface.h +++ b/engine/include/flatsurface.h @@ -1,7 +1,7 @@ #ifndef __FLATSURFACE_H__ #define __FLATSURFACE_H__ -#include "object.hpp" +#include "core/object.hpp" #include <SDL2/SDL.h> class FlatSurface : public flat::core::object diff --git a/engine/include/flatwindow.h b/engine/include/flatwindow.h index c03a3a9..37e834d 100644 --- a/engine/include/flatwindow.h +++ b/engine/include/flatwindow.h @@ -26,7 +26,7 @@ struct window_status unsigned char focus:1; }; -#include "object.hpp" +#include "core/object.hpp" #include "serial/keyfocusable.h" class SDL_Window; |