diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2014-12-04 18:29:42 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2014-12-04 20:02:50 +0100 |
commit | abafb52f37beb5659efc2105ccd1568e1f754898 (patch) | |
tree | 6a60636d3497560ca61e5aae5f6d7061c4f18553 /include/mbgl/map/tile_data.hpp | |
parent | bff6aeb4da41dee1f5f1cfa0be81b6c257257253 (diff) | |
download | qtlocation-mapboxgl-abafb52f37beb5659efc2105ccd1568e1f754898.tar.gz |
make most headers private
Diffstat (limited to 'include/mbgl/map/tile_data.hpp')
-rw-r--r-- | include/mbgl/map/tile_data.hpp | 88 |
1 files changed, 0 insertions, 88 deletions
diff --git a/include/mbgl/map/tile_data.hpp b/include/mbgl/map/tile_data.hpp deleted file mode 100644 index 1ae215b204..0000000000 --- a/include/mbgl/map/tile_data.hpp +++ /dev/null @@ -1,88 +0,0 @@ -#ifndef MBGL_MAP_TILE_DATA -#define MBGL_MAP_TILE_DATA - -#include <mbgl/map/tile.hpp> -#include <mbgl/renderer/debug_bucket.hpp> -#include <mbgl/geometry/debug_font_buffer.hpp> - -#include <mbgl/util/noncopyable.hpp> -#include <mbgl/util/ptr.hpp> - -#include <atomic> -#include <exception> -#include <iosfwd> -#include <string> -#include <functional> - -namespace uv { -class worker; -} - -namespace mbgl { - -class Map; -class FileSource; -class Painter; -class SourceInfo; -class StyleLayer; -class Request; - -class TileData : public std::enable_shared_from_this<TileData>, - private util::noncopyable { -public: - struct exception : std::exception {}; - struct geometry_too_long_exception : exception {}; - -public: - typedef util::ptr<TileData> Ptr; - - enum class State { - invalid, - initial, - loading, - loaded, - parsed, - obsolete - }; - -public: - TileData(Tile::ID const& id, const SourceInfo&); - ~TileData(); - - void request(uv::worker&, FileSource&, float pixelRatio, std::function<void ()> callback); - void reparse(uv::worker&, std::function<void ()> callback); - void cancel(); - const std::string toString() const; - - inline bool ready() const { - return state == State::parsed; - } - - // Override this in the child class. - virtual void parse() = 0; - virtual void render(Painter &painter, util::ptr<StyleLayer> layer_desc, const mat4 &matrix) = 0; - virtual bool hasData(StyleLayer const& layer_desc) const = 0; - - -public: - const Tile::ID id; - const std::string name; - std::atomic<State> state; - -public: - const SourceInfo& source; - -protected: - std::unique_ptr<Request> req; - std::string data; - - // Contains the tile ID string for painting debug information. - DebugFontBuffer debugFontBuffer; - -public: - DebugBucket debugBucket; -}; - -} - -#endif |