PerSt Pile   version 0.0.1
Persistent storage pile used for storing key/value pairs
PerStFactory Class Reference

Factory class that produces PerSt instances. More...

#include <perst_factory.h>

Public Types

typedef PerSt *(* kbCreate) (const PERST_STRING &name, const PERST_STRING &value, void *user_data)
 callback used to create PerSt instances by providers.
 
typedef bool(* kbForEach) (int index, const PERST_STRING &name, kbCreate kb, void *user_data, void *for_each_user_data)
 callback used to iterate all providers.
 

Static Public Member Functions

static void init ()
 Start-up. More...
 
static void end ()
 End-up. More...
 
static PerStcreate (const PERST_STRING &name, const PERST_STRING &value)
 Create a new instance. More...
 
static bool addProvider (const PERST_STRING &name, kbCreate kb, void *user_data)
 Register a new kind. More...
 
static bool delProvider (const PERST_STRING &name)
 Unregister a custom kind. More...
 
static bool hasProvider (const PERST_STRING &name)
 Tell if a name is registered. More...
 
static bool forEachProvider (kbForEach kb, void *for_each_user_data)
 Iterate all providers (includes build-ins). More...
 

Detailed Description

Factory class that produces PerSt instances.

Member Function Documentation

bool PerStFactory::addProvider ( const PERST_STRING &  name,
PerStFactory::kbCreate  kb,
void *  user_data 
)
static

Register a new kind.

The method creates the singleton if it does not already exists.

PerSt * PerStFactory::create ( const PERST_STRING &  name,
const PERST_STRING &  value 
)
static

Create a new instance.

The method creates the singleton if it does not already exists.

bool PerStFactory::delProvider ( const PERST_STRING &  name)
static

Unregister a custom kind.

The method creates the singleton if it does not already exists.

void PerStFactory::end ( )
static

End-up.

Deletes the singleton.

bool PerStFactory::forEachProvider ( PerStFactory::kbForEach  kb,
void *  for_each_user_data 
)
static

Iterate all providers (includes build-ins).

The method creates the singleton if it does not already exists.

bool PerStFactory::hasProvider ( const PERST_STRING &  name)
static

Tell if a name is registered.

The method creates the singleton if it does not already exists.

void PerStFactory::init ( )
static

Start-up.

Creates the singleton.


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