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

#include <ConfigurationManager.h>

+ Collaboration diagram for ConfigurationManager:

Public Member Functions

size_t createTable (const String &configStore, const String &table)
 
void insert (const String &configStore, const String &table, const String &key, const ConfigValue &value)
 
ConfigValueselect (const String &configStore, const String &table, const String &key)
 
void watch (const String &configStore, const String &table, const String &key, ConfigurationWatcher watcher)
 
void unwatch (const String &configStore, const String &table, const String &key, ConfigurationWatcher watcher)
 
bool installBackend (ConfigurationBackend *pBackend, const String &configStore=String(""))
 
void removeBackend (const String &configStore)
 
bool backendExists (const String &configStore)
 

Static Public Member Functions

static ConfigurationManagerinstance ()
 

Private Attributes

RadixTree< ConfigurationBackend * > m_Backends
 

Static Private Attributes

static ConfigurationManager m_Instance
 

Detailed Description

The central manager for the Pedigree configuration system.

This class provides a thin layer between the kernel and multiple configuration backends.

The configuration system is table based; like a database. Tables contain columns and rows, one column being the key; At the moment the key must be a String, and there can only be one piece of data per row.

Definition at line 70 of file ConfigurationManager.h.

Member Function Documentation

void ConfigurationManager::insert ( const String configStore,
const String table,
const String key,
const ConfigValue value 
)

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

Definition at line 52 of file ConfigurationManager.cc.

References RadixTree< T >::insert(), and RadixTree< T >::lookup().

ConfigValue & ConfigurationManager::select ( const String configStore,
const String table,
const String key 
)

Returns the value in table, with key matching 'key', or a Value with "type" field as Invalid.

Definition at line 64 of file ConfigurationManager.cc.

References RadixTree< T >::lookup().

void ConfigurationManager::unwatch ( const String configStore,
const String table,
const String key,
ConfigurationWatcher  watcher 
)

Remove a watcher from a table entry.

Definition at line 89 of file ConfigurationManager.cc.

References RadixTree< T >::lookup().

void ConfigurationManager::watch ( const String configStore,
const String table,
const String key,
ConfigurationWatcher  watcher 
)

Watch a specific table entry.

Definition at line 77 of file ConfigurationManager.cc.

References RadixTree< T >::lookup().


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