geostat/api.h

22 wiersze
443 B
C
Czysty Zwykły widok Historia

2019-09-08 16:42:10 +00:00
#pragma once
#include "cache.h"
#include <vector>
class Api {
public:
Api() {}
virtual ~Api() {}
// virtual Cache get_cache(std::string code) = 0;
// virtual Caches get_caches(std::vector<std::string> codes) = 0;
virtual Caches get_user_caches(std::string uuid, int count = 0) = 0;
2019-10-03 22:23:03 +00:00
protected:
Position get_lat_lon(std::string loc) {
2019-11-04 20:44:08 +00:00
int pos = loc.find("|");
return { stof(loc.substr(0, pos)), stof(loc.substr(pos + 1)) };
2019-10-03 22:23:03 +00:00
}
2019-09-08 16:42:10 +00:00
};