geostat/api.h

22 wiersze
462 B
C++

#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(const std::string& uuid, int count = 0) const = 0;
protected:
Position get_lat_lon(std::string loc) const {
int pos = loc.find("|");
return { stof(loc.substr(0, pos)), stof(loc.substr(pos + 1)) };
}
};