8 #include <unordered_map> 26 std::unordered_map<std::string, std::unique_ptr<TileLayer>> m_tilelayers;
27 std::unordered_map<std::string, std::unique_ptr<ObjectLayer>> m_objectlayers;
28 std::unordered_map<std::string, std::unique_ptr<ImageLayer>> m_imagelayers;
29 std::unordered_map<std::string, std::unique_ptr<GroupLayer>> m_grouplayers;
30 std::vector<Layer*> m_layers;
36 auto hasLayer(
const std::string& name)
const -> bool;
37 auto getTileLayer(
const std::string& name)
const ->
TileLayer&;
38 auto getObjectLayer(
const std::string& name)
const ->
ObjectLayer&;
39 auto getImageLayer(
const std::string& name)
const ->
ImageLayer&;
40 auto getGroupLayer(
const std::string& name)
const ->
GroupLayer&;
42 void update(
const Camera* cam);
45 void parseLayers(
const pugi::xml_node& xml_node,
TiledMap* tiledmap);
47 auto addTileLayer(
const pugi::xml_node& xml_node,
TiledMap* tiledmap) ->
Layer*;
48 auto addObjectLayer(
const pugi::xml_node& xml_node,
TiledMap* tiledmap) ->
Layer*;
49 auto addImageLayer(
const pugi::xml_node& xml_node,
TiledMap* tiledmap) ->
Layer*;
50 auto addGroupLayer(
const pugi::xml_node& xml_node,
TiledMap* tiledmap) ->
Layer*;
52 auto allTileLayers()
const ->
const decltype(m_tilelayers)&;
53 auto allObjectLayers()
const ->
const decltype(m_objectlayers)&;
54 auto allImageLayers()
const ->
const decltype(m_imagelayers)&;
55 auto allGroupLayers()
const ->
const decltype(m_grouplayers)&;
56 auto allLayers()
const ->
const decltype(m_layers)&;