diff options
author | 2017-07-06 11:32:50 +0200 | |
---|---|---|
committer | 2017-08-08 17:24:00 +0200 | |
commit | 9dfa6b9427115e7402ce25e40e4d78b20d559c93 (patch) | |
tree | a790ce4ce7b15930c1550c5b08bc51930dd75dbc /src/wayland.hpp | |
parent | ba5360ac03286364abd9fde6b500e2c0fabe56b1 (diff) |
Move all nlohmann::json to json_helper.cpp
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
Diffstat (limited to 'src/wayland.hpp')
-rw-r--r-- | src/wayland.hpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/wayland.hpp b/src/wayland.hpp index 4865e42..7e005f1 100644 --- a/src/wayland.hpp +++ b/src/wayland.hpp @@ -228,6 +228,14 @@ struct screen : public wayland_proxy<struct ivi_controller_screen>, // \___\___/|_| |_|\__|_| \___/|_|_|\___|_| // struct controller : public wayland_proxy<struct ivi_controller> { + typedef std::unordered_map<uintptr_t, uint32_t> proxy_to_id_map_type; + typedef std::unordered_map<uint32_t, std::unique_ptr<struct surface>> + surface_map_type; + typedef std::unordered_map<uint32_t, std::unique_ptr<struct layer>> + layer_map_type; + typedef std::unordered_map<uint32_t, std::unique_ptr<struct screen>> + screen_map_type; + // HACK: // The order of these member is mandatory, as when objects are destroyed // they will call their parent (that's us right here!) and remove their @@ -235,13 +243,13 @@ struct controller : public wayland_proxy<struct ivi_controller> { // when the surfaces/layers/screens maps are destroyed. This sucks, but // I cannot see a better solution w/o globals or some other horrible // call-our-parent construct. - std::unordered_map<uintptr_t, uint32_t> surface_proxy_to_id; - std::unordered_map<uintptr_t, uint32_t> layer_proxy_to_id; - std::unordered_map<uintptr_t, uint32_t> screen_proxy_to_id; + proxy_to_id_map_type surface_proxy_to_id; + proxy_to_id_map_type layer_proxy_to_id; + proxy_to_id_map_type screen_proxy_to_id; - std::unordered_map<uint32_t, std::unique_ptr<struct surface>> surfaces; - std::unordered_map<uint32_t, std::unique_ptr<struct layer>> layers; - std::unordered_map<uint32_t, std::unique_ptr<struct screen>> screens; + surface_map_type surfaces; + layer_map_type layers; + screen_map_type screens; typedef std::pair<char const *, std::function<void(struct controller *)>> name_task_pair; |