[core] rename TileData::State to DataAvailability and make it private

This commit is contained in:
Konstantin Käfer
2016-05-25 20:52:19 +02:00
parent 6f1477f2d4
commit b4de5f472a
10 changed files with 55 additions and 60 deletions

View File

@@ -5,24 +5,15 @@
namespace mbgl {
TileData::TileData(const OverscaledTileID& id_)
: id(id_),
state(State::loading) {
: id(id_) {
}
TileData::~TileData() = default;
const char* TileData::StateToString(const State state) {
switch (state) {
case TileData::State::loading : return "loading";
case TileData::State::parsed : return "parsed";
case TileData::State::partial : return "partial";
default: return "<unknown>";
}
}
void TileData::dumpDebugLogs() const {
Log::Info(Event::General, "TileData::id: %s", util::toString(id).c_str());
Log::Info(Event::General, "TileData::state: %s", TileData::StateToString(state));
Log::Info(Event::General, "TileData::renderable: %s", isRenderable() ? "yes" : "no");
Log::Info(Event::General, "TileData::complete: %s", isComplete() ? "yes" : "no");
}
void TileData::queryRenderedFeatures(