acl/lib_acl_cpp/include/acl_cpp/redis/redis_response.hpp
zsxxsz cc05b877a2 first commit acl to github
first commit acl to github
2013-08-18 17:42:25 +08:00

40 lines
478 B
C++

#pragma once
#include "acl_cpp/stdlib/string.hpp"
typedef enum
{
REDIS_KEY_NULL,
REDIS_KEY_STR,
REDIS_KEY_LIST,
REDIS_KEY_SET,
REDIS_KEY_ZSET,
REDIS_KEY_HASH
} redis_key_t;
namespace acl
{
class redis_response
{
public:
redis_response() {}
~redis_response() {}
bool isString()
{
return type == REDIS_KEY_STR;
}
private:
redis_key_t type;
unsigned count;
union
{
string* value;
long long intval;
redis_response* values;
};
};
} // end namespace acl