diff options
Diffstat (limited to 'src/mbgl/map/map_data.hpp')
-rw-r--r-- | src/mbgl/map/map_data.hpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/mbgl/map/map_data.hpp b/src/mbgl/map/map_data.hpp index 29ba227110..c0d57134d9 100644 --- a/src/mbgl/map/map_data.hpp +++ b/src/mbgl/map/map_data.hpp @@ -5,6 +5,7 @@ #include <mutex> #include <atomic> #include <chrono> +#include <vector> namespace mbgl { @@ -41,6 +42,24 @@ public: accessToken = token; } + // Adds the class if it's not yet set. Returns true when it added the class, and false when it + // was already present. + bool addClass(const std::string& klass); + + // Removes the class if it's present. Returns true when it remvoed the class, and false when it + // was not present. + bool removeClass(const std::string& klass); + + // Returns true when class is present in the list of currently set classes. + bool hasClass(const std::string& klass) const; + + // Changes the list of currently set classes to the new list. + void setClasses(const std::vector<std::string>& klasses); + + // Returns a list of all currently set classes. + std::vector<std::string> getClasses() const; + + inline bool getDebug() const { return debug; } @@ -72,6 +91,7 @@ private: StyleInfo styleInfo; std::string accessToken; + std::vector<std::string> classes; std::atomic<uint8_t> debug { false }; std::atomic<std::chrono::steady_clock::time_point::duration> animationTime; std::atomic<std::chrono::steady_clock::duration> defaultTransitionDuration; |