2 #include "../acl_cpp_define.hpp" 5 #include "../stdlib/string.hpp" 8 #if !defined(ACL_CLIENT_ONLY) && !defined(ACL_REDIS_DISABLE) 13 #define GEO_INVALID 360 14 #define GEO_LONGITUDE_MIN -180 15 #define GEO_LONGITUDE_MAX 180 16 #define GEO_LATITUDE_MIN -85.05112878 17 #define GEO_LATITUDE_MAX 85.05112878 48 void set_name(
const char*
name);
54 void set_dist(
double dist);
60 #if defined(_WIN32) || defined(_WIN64) 61 void set_hash(__int64 hash);
62 __int64 get_hash() const
64 void set_hash(
long long int hash);
66 #endif // defined(_WIN32) || defined(_WIN64) 71 void set_coordinate(
double longitude,
double latitude);
85 #if defined(_WIN32) || defined(_WIN64) 89 #endif // defined(_WIN32) || defined(_WIN64) 141 int geoadd(
const char* key,
const char* member,
142 double longitude,
double latitude);
168 int geoadd(
const char* key,
size_t size,
const char* members[],
169 const double longitudes[],
const double latitudes[]);
196 int geoadd(
const char* key,
const std::vector<string>& members,
197 const std::vector<double>& longitudes,
198 const std::vector<double>& latitudes);
212 bool geohash(
const char* key,
const std::vector<string>& members,
213 std::vector<string>& results);
227 bool geohash(
const char* key,
const char* member,
string& result);
241 bool geopos(
const char* key,
const std::vector<string>& members,
242 std::vector<std::pair<double, double> >& results);
257 bool geopos(
const char* key,
const char* member,
258 std::pair<double, double>& result);
274 double geodist(
const char* key,
const char* member1,
298 const std::vector<geo_member>& georadius(
const char* key,
299 double longitude,
double latitude,
double radius,
323 const std::vector<geo_member>& georadiusbymember(
const char* key,
324 const char* member,
double radius,
330 std::vector<geo_member> positions_;
333 static const char* get_unit(
int unit);
338 #endif // !defined(ACL_CLIENT_ONLY) && !defined(ACL_REDIS_DISABLE)
HTTP_API void const char * name
double get_latitude() const
#define ACL_CPP_DEPRECATED
double get_longitude() const
const char * get_name() const
long long int get_hash() const