Phants Client for Redis™*
Public Member Functions | List of all members
ArrayParser Interface Reference
Inheritance diagram for ArrayParser:
Inheritance graph
[legend]

Public Member Functions

void ArrayBegin (int size)
 
void ArrayDone ()
 

Detailed Description

This interface defines methods that are called at the start and end of a RESP Array. Since Arrays can contain any RESP type (including other Arrays), this interface does not provide callbacks for the individual elements. The interfaces that do provide this are:

As soon as a RESP Array is detected and its size is determined, ArrayBegin() is called. As mentioned above, other Parser callbacks will fire as elements in a response/stream are consumed. Once all Array elements have been processed, ArrayDone() is called.

Note: when nested Arrays are encountered, ArrayBegin() may be called any number of times before ArrayDone(); it is the user's responsibility to keep track of which Array the callbacks pertains to.

Member Function Documentation

void ArrayBegin ( int  size)

Called at the start of a RESP Array.

Parameters
sizeThe number of elements in the array being parsed.

Implemented in MessageParser, BulkStringArraySinkAdapter, and IntegerArraySinkAdapter.

void ArrayDone ( )

Called at the end of a RESP Array.

Implemented in MessageParser, BulkStringArraySinkAdapter, and IntegerArraySinkAdapter.


The documentation for this interface was generated from the following file: