Arduino-Redis
A Redis library for Arduino.
Public Member Functions | Protected Attributes | List of all members
RedisArray Class Reference

Detailed Description

An Array: https://redis.io/topics/protocol#resp-arrays

Definition at line 86 of file RedisInternal.h.

Public Member Functions

 RedisArray (Client &c)
 
void add (std::shared_ptr< RedisObject > param)
 
 operator std::vector< String > () const
 
virtual void init (Client &client) override
 
virtual String RESP () override
 
- Public Member Functions inherited from RedisObject
 RedisObject (Type tc)
 
 RedisObject (Type tc, Client &c)
 
virtual operator String ()
 
Type type () const
 

Protected Attributes

std::vector< std::shared_ptr< RedisObject > > vec
 
- Protected Attributes inherited from RedisObject
String data
 
Type _type = Type::NoType
 

Additional Inherited Members

- Public Types inherited from RedisObject
enum  Type {
  NoType = '\0', SimpleString = '+', Error = '-', Integer = ':',
  BulkString = '$', Array = '*', InternalError = '!'
}
 
- Static Public Member Functions inherited from RedisObject
static std::shared_ptr< RedisObjectparseType (Client &)
 

#include <RedisInternal.h>

Inheritance diagram for RedisArray:
Inheritance graph
[legend]

Member Function Documentation

◆ init()

void RedisArray::init ( Client &  client)
overridevirtual

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 from RedisObject.

Definition at line 55 of file RedisInternal.cpp.

◆ RESP()

String RedisArray::RESP ( )
overridevirtual

Produce the Redis serialization protocol (RESP) representation. Must be overridden.

Implements RedisObject.

Definition at line 69 of file RedisInternal.cpp.