|
The Pedigree Project
0.1
|
#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) |
| ConfigValue & | select (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 ConfigurationManager & | instance () |
Private Attributes | |
| RadixTree< ConfigurationBackend * > | m_Backends |
Static Private Attributes | |
| static ConfigurationManager | m_Instance |
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.
| 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().
1.8.11