A basic object model for the Redis serialization protocol (RESP): https://redis.io/topics/protocol
Definition at line 22 of file RedisInternal.h.
#include <RedisInternal.h>
◆ Type
Denote a basic Redis type, with NoType and InternalError defined specifically for this API
Enumerator |
---|
NoType | |
SimpleString | |
Error | |
Integer | |
BulkString | |
Array | |
InternalError | |
Definition at line 26 of file RedisInternal.h.
◆ RedisObject() [1/3]
RedisObject::RedisObject |
( |
| ) |
|
|
inline |
◆ RedisObject() [2/3]
RedisObject::RedisObject |
( |
Type |
tc | ) |
|
|
inline |
◆ RedisObject() [3/3]
RedisObject::RedisObject |
( |
Type |
tc, |
|
|
Client & |
c |
|
) |
| |
|
inline |
◆ ~RedisObject()
virtual RedisObject::~RedisObject |
( |
| ) |
|
|
inlinevirtual |
◆ init()
void RedisObject::init |
( |
Client & |
client | ) |
|
|
virtual |
Initialize a RedisObject instance from the bytestream represented by 'client'. Only does very basic (e.g. SimpleString-style) parsing of the object from the byte stream. Concrete subclasses are expected to override this to provide class-specific parsing & initialization logic.
Reimplemented in RedisArray, and RedisBulkString.
Definition at line 6 of file RedisInternal.cpp.
◆ operator String()
virtual RedisObject::operator String |
( |
| ) |
|
|
inlinevirtual |
Produce a human-readable String representation. Base implementation only returns the type character, so should be overriden.
Definition at line 58 of file RedisInternal.h.
◆ parseType()
std::shared_ptr< RedisObject > RedisObject::parseType |
( |
Client & |
client | ) |
|
|
static |
◆ parseTypeNonBlocking()
std::shared_ptr< RedisObject > RedisObject::parseTypeNonBlocking |
( |
Client & |
client | ) |
|
|
static |
◆ RESP()
virtual String RedisObject::RESP |
( |
| ) |
|
|
pure virtual |
◆ type()
Type RedisObject::type |
( |
| ) |
const |
|
inline |
◆ _type
Type RedisObject::_type = Type::NoType |
|
protected |
◆ data