Arduino-Redis
A Redis library for Arduino.
|
Go to the documentation of this file. 1 #ifndef REDIS_INTERNAL_H
2 #define REDIS_INTERNAL_H
10 #define CRLF F("\r\n")
44 static std::shared_ptr<RedisObject>
parseType(Client &);
51 virtual void init(Client &client);
54 virtual String
RESP() = 0;
58 virtual operator String() {
if(
data)
return data;
return String(
"(nil)");}
74 virtual String
RESP()
override;
85 virtual void init(Client &client)
override;
87 virtual String
RESP()
override;
98 void add(std::shared_ptr<RedisObject> param) {
vec.push_back(param); }
101 operator std::vector<String>()
const;
103 operator std::vector<std::shared_ptr<RedisObject>>()
const;
105 virtual void init(Client &client)
override;
107 virtual String
RESP()
override;
110 std::vector<std::shared_ptr<RedisObject>>
vec;
120 operator int() {
return data.toInt(); }
121 operator bool() {
return (
bool)
operator int(); }
151 virtual String
RESP()
override {
return "-INTERNAL ERROR " + String(
_code) + (
data ?
": " +
data :
""); }
169 for (
auto arg : args)
182 std::shared_ptr<RedisObject>
issue(Client &cmdClient);
184 template <
typename T>
191 #endif // REDIS_INTERNAL_H
virtual void init(Client &client)
RedisCommand(String command, ArgList args)
std::shared_ptr< RedisObject > issue(Client &cmdClient)
virtual void init(Client &client) override
void add(std::shared_ptr< RedisObject > param)
virtual String RESP() override
std::vector< std::shared_ptr< RedisObject > > vec
virtual String RESP() override
~RedisBulkString() override
RedisInternalErrorCode _code
static std::shared_ptr< RedisObject > parseTypeNonBlocking(Client &)
RedisInternalError(RedisInternalErrorCode c, String es)
virtual void init(Client &client) override
RedisCommand(String command)
~RedisInternalError() override
RedisBulkString(Client &c)
static std::shared_ptr< RedisObject > parseType(Client &)
T issue_typed(Client &cmdClient)
RedisInternalErrorCode code()
std::vector< String > ArgList
void setErrorString(String es)
RedisInternalError(RedisInternalErrorCode c)
virtual String RESP() override
~RedisSimpleString() override
virtual String RESP() override
RedisSimpleString(Client &c)
RedisObject(Type tc, Client &c)
RedisBulkString(String &s)