PerSt Pile   version 0.0.1
Persistent storage pile used for storing key/value pairs
PerstInterface Class Referenceabstract

Interface class for persistent storage. More...

#include <perst_interface.h>

+ Inheritance diagram for PerstInterface:

Public Member Functions

virtual bool beginGroup (const PERST_STRING &name)=0
 Starts a group; internal state is altered.
 
virtual bool endGroup (const PERST_STRING &name="")=0
 Ends a group; internal state is altered.
 
virtual bool beginWriteArray (const PERST_STRING &name, int predicted_count=-1)=0
 Starts writing an array; internal state is altered.
 
virtual int beginReadArray (const PERST_STRING &name)=0
 Starts reading an array; internal state is altered.
 
virtual bool endArray (const PERST_STRING &name="")=0
 Ends an array; internal state is altered.
 
virtual int arrayIndex () const =0
 Get current index of an array.
 
virtual bool setArrayIndex (int index)=0
 Set current index of an array.
 
virtual PERST_STRING group () const =0
 Tell the name of current group (arrays are also groups).
 
virtual PERST_SLIST groupPath () const =0
 Tell the full path of current group (arrays are also groups).
 
virtual bool hasKey (const PERST_STRING &name)=0
 Tell if a given key exists (relative to current group).
 
virtual bool hasKey (const PERST_SLIST &name)=0
 Tell if a given path exists (relative to current group).
 
virtual PERST_STRING valueS (const PERST_STRING &name)=0
 Get the string value for a key; the value type MUST be string.
 
virtual PERST_SLIST valueSList (const PERST_STRING &name)=0
 Get the string list for a key; the value type MUST be an array of strings.
 
virtual int64_t valueInt (const PERST_STRING &name)=0
 Get the integer value for a key; the value type MUST be integer.
 
virtual uint64_t valueUInt (const PERST_STRING &name)=0
 Get the integer value for a key; the value type MUST be integer.
 
virtual double valueDbl (const PERST_STRING &name)=0
 Get the real value for a key; the value type MUST be real.
 
PERST_STRING valueS (const PERST_STRING &name, const PERST_STRING &default_val)
 Get the string value for a key; the value type MUST be string.
 
PERST_SLIST valueSList (const PERST_STRING &name, const PERST_SLIST &default_val)
 Get the string list for a key; the value type MUST be an array of strings.
 
int64_t valueInt (const PERST_STRING &name, int64_t default_val)
 Get the integer value for a key; the value type MUST be integer.
 
uint64_t valueUInt (const PERST_STRING &name, uint64_t default_val)
 Get the integer value for a key; the value type MUST be integer.
 
double valueDbl (const PERST_STRING &name, double default_val)
 Get the real value for a key; the value type MUST be real.
 
virtual bool setValue (const PERST_STRING &name, const PERST_STRING &value)=0
 Set the string value for a key.
 
virtual bool setValue (const PERST_STRING &name, const PERST_SLIST &value)=0
 Set the string list for a key.
 
virtual bool setValue (const PERST_STRING &name, int64_t value)=0
 Set the integer value for a key.
 
virtual bool setValue (const PERST_STRING &name, uint64_t value)=0
 Set the integer value for a key.
 
virtual bool setValue (const PERST_STRING &name, int value)
 Set the integer value for a key.
 
virtual bool setValue (const PERST_STRING &name, double value)=0
 Set the real value for a key.
 

Detailed Description

Interface class for persistent storage.


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