The Pedigree Project  0.1
Classes | Public Member Functions | Private Attributes | List of all members
MemoryBackend Class Reference

#include <MemoryBackend.h>

+ Inheritance diagram for MemoryBackend:
+ Collaboration diagram for MemoryBackend:

Classes

struct  Table
 

Public Member Functions

 MemoryBackend (const String &configStore)
 
virtual size_t createTable (const String &table)
 
virtual void insert (const String &table, const String &key, const ConfigValue &value)
 
virtual ConfigValueselect (const String &table, const String &key)
 
virtual void watch (const String &table, const String &key, ConfigurationWatcher watcher)
 
virtual void unwatch (const String &table, const String &key, ConfigurationWatcher watcher)
 
const StringgetTypeName ()
 
- Public Member Functions inherited from ConfigurationBackend
 ConfigurationBackend (const String &configStore)
 
virtual const StringgetConfigStore ()
 

Private Attributes

RadixTree< Table * > m_Tables
 
String m_TypeName
 

Additional Inherited Members

- Protected Attributes inherited from ConfigurationBackend
String m_ConfigStore
 

Detailed Description

Memory configuration backend. Stores everything in RAM, won't save to file. Good for runtime-only information.

Definition at line 32 of file MemoryBackend.h.

Member Function Documentation

void MemoryBackend::insert ( const String table,
const String key,
const ConfigValue value 
)
virtual

Inserts the value 'value' into the table 'table', with its key as 'key'

Implements ConfigurationBackend.

Definition at line 39 of file MemoryBackend.cc.

ConfigValue & MemoryBackend::select ( const String table,
const String key 
)
virtual

Returns the value in table, with key matching 'key', or zero.

Implements ConfigurationBackend.

Definition at line 50 of file MemoryBackend.cc.

void MemoryBackend::unwatch ( const String table,
const String key,
ConfigurationWatcher  watcher 
)
virtual

Remove a watcher from a table entry.

Implements ConfigurationBackend.

Definition at line 89 of file MemoryBackend.cc.

void MemoryBackend::watch ( const String table,
const String key,
ConfigurationWatcher  watcher 
)
virtual

Watch a specific table entry.

Implements ConfigurationBackend.

Definition at line 67 of file MemoryBackend.cc.


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