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 90 of file RedisInternal.h.

Public Member Functions

 RedisArray ()
 
 RedisArray (Client &c)
 
 ~RedisArray () override
 
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 ()
 
 RedisObject (Type tc)
 
 RedisObject (Type tc, Client &c)
 
virtual ~RedisObject ()
 
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]

Constructor & Destructor Documentation

◆ RedisArray() [1/2]

RedisArray::RedisArray ( )
inline

Definition at line 93 of file RedisInternal.h.

◆ RedisArray() [2/2]

RedisArray::RedisArray ( Client &  c)
inline

Definition at line 94 of file RedisInternal.h.

◆ ~RedisArray()

RedisArray::~RedisArray ( )
inlineoverride

Definition at line 95 of file RedisInternal.h.

Member Function Documentation

◆ add()

void RedisArray::add ( std::shared_ptr< RedisObject param)
inline

Definition at line 97 of file RedisInternal.h.

◆ 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 57 of file RedisInternal.cpp.

◆ operator std::vector< String >()

RedisArray::operator std::vector< String > ( ) const

Definition at line 63 of file RedisInternal.cpp.

◆ RESP()

String RedisArray::RESP ( )
overridevirtual

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

Implements RedisObject.

Definition at line 71 of file RedisInternal.cpp.

Member Data Documentation

◆ vec

std::vector<std::shared_ptr<RedisObject> > RedisArray::vec
protected

Definition at line 106 of file RedisInternal.h.