|
solarpowerlog trunk
|
#include <Registry.h>

Public Member Functions | |
| bool | LoadConfig (std::string name) |
| IInverterBase * | GetInverter (const string &name) const |
| void | AddInverter (const IInverterBase *inverter) |
Static Public Member Functions | |
| static Registry & | Instance () |
| static libconfig::Config * | Configuration () |
| static ILogger & | GetMainLogger (void) |
| static CWorkScheduler * | GetMainScheduler (void) |
Protected Member Functions | |
| Registry () | |
| virtual | ~Registry () |
Friends | |
| class | CConfigHelper |
The Registry stores some information needed by several program parts. It also provides a global WorkScheduler.
The Registry is a Singleton.
Definition at line 129 of file Registry.h.
| Registry::Registry | ( | ) | [protected] |
singleton: no object generation
constructor for the registry.
Definition at line 49 of file Registry.cpp.
| Registry::~Registry | ( | ) | [protected, virtual] |
destructor
Definition at line 135 of file Registry.cpp.
| void Registry::AddInverter | ( | const IInverterBase * | inverter | ) |
Add the a new created inveter/logger to the object database
Definition at line 128 of file Registry.cpp.
| static libconfig::Config* Registry::Configuration | ( | ) | [inline, static] |
Shortcut to get the configuration.
Please note, that it must be config_loaded beforehand. (but if coding for solarpowerlog, this will be done early in the startup phase, so one can expect a valid object here.
Definition at line 149 of file Registry.h.

| IInverterBase * Registry::GetInverter | ( | const string & | name | ) | const |
search for an inverter/logger object with the object name
| name | of the object |
Definition at line 116 of file Registry.cpp.
| static ILogger& Registry::GetMainLogger | ( | void | ) | [inline, static] |
| static CWorkScheduler* Registry::GetMainScheduler | ( | void | ) | [inline, static] |
Get the main scheduler to scheule work...
Definition at line 241 of file Registry.h.

| static Registry& Registry::Instance | ( | ) | [inline, static] |
return the static, global object of the registry.
Definition at line 136 of file Registry.h.
| bool Registry::LoadConfig | ( | std::string | name | ) |
(re)load configuration file
Just brings it in memory... The old one will be deleted.
| [in] | name | Filename to load |
Definition at line 56 of file Registry.cpp.
friend class CConfigHelper [friend] |
Definition at line 133 of file Registry.h.