#ifndef MBGL_STYLE_STYLE #define MBGL_STYLE_STYLE #include #include #include #include #include #include #include #include #include #include #include namespace mbgl { class Sprite; class StyleLayer; class StyleLayerGroup; class Style { public: struct exception : std::runtime_error { exception(const char *msg) : std::runtime_error(msg) {} }; public: Style(); ~Style(); void loadJSON(const uint8_t *const data); size_t layerCount() const; void updateProperties(float z, timestamp t); void setDefaultTransitionDuration(uint16_t duration_milliseconds = 0); void setAppliedClasses(const std::vector &classes); const std::vector &getAppliedClasses() const; void toggleClass(const std::string &name); // Updates the styling information to reflect the current array // of applied classes. void updateClasses(); bool hasTransitions() const; const std::string &getSpriteURL() const; public: util::ptr layers; std::vector appliedClasses; std::string glyph_url; private: std::string sprite_url; private: PropertyTransition defaultTransition; bool initial_render_complete = false; std::unique_ptr mtx; }; } #endif