![]() |
Public API Reference |
#include <cfgmgr.h>
Inheritance diagram for iConfigManager:
Public Types | |
enum | |
Default priority values (you may use other values if you want). More... | |
Public Methods | |
virtual void | AddDomain (iConfigFile *, int priority)=0 |
add a configuration domain. More... | |
virtual iConfigFile * | AddDomain (char const *path, iVFS *, int priority)=0 |
Add a configuration domain. More... | |
virtual void | RemoveDomain (iConfigFile *)=0 |
remove a configuration domain. More... | |
virtual void | RemoveDomain (char const *path)=0 |
remove a configuration domain. More... | |
virtual iConfigFile * | LookupDomain (char const *path) const=0 |
return a pointer to a single config domain. More... | |
virtual void | SetDomainPriority (char const *path, int priority)=0 |
set the priority of a config domain. More... | |
virtual void | SetDomainPriority (iConfigFile *, int priority)=0 |
set the priority of a config domain. More... | |
virtual int | GetDomainPriority (char const *path) const=0 |
return the priority of a config domain. More... | |
virtual int | GetDomainPriority (iConfigFile *) const=0 |
return the priority of a config domain. More... | |
virtual bool | SetDynamicDomain (iConfigFile *)=0 |
Change the dynamic domain. More... | |
virtual iConfigFile * | GetDynamicDomain () const=0 |
return a pointer to the dynamic config domain. More... | |
virtual void | SetDynamicDomainPriority (int priority)=0 |
set the priority of the dynamic config domain. More... | |
virtual int | GetDynamicDomainPriority () const=0 |
return the priority of the dynamic config domain. More... | |
virtual void | FlushRemoved ()=0 |
flush all removed config files (only required in optimize mode). More... |
To do this, every config file object (also called 'domain') is assigned a priority value. Options from config files with higher priority override options from config files with lower priority. These 'lower' options are not really deleted, so if you access the 'lower' config file directly you will still find their real value. If two config objects use the same priority value, it is not defined which of them takes precedence.
One config object is the so-called 'dynamic' object. When you change something in the global configuration, these changes are applied to the dynamic config object. The changed key is removed from all objects with higher priority. The dynamic object has always priority 0 (medium).
Differences in behaviour compared to a normal confguration object are:
Definition at line 63 of file iutil/cfgmgr.h.
|
Default priority values (you may use other values if you want).
Definition at line 77 of file iutil/cfgmgr.h. |
|
Add a configuration domain. The new config file is also returned. If you want to store the pointer yourself, you must first IncRef it. Implemented in csConfigManager. |
|
add a configuration domain.
Implemented in csConfigManager. |
|
flush all removed config files (only required in optimize mode).
Implemented in csConfigManager. |
|
return the priority of a config domain.
Implemented in csConfigManager. |
|
return the priority of a config domain.
Implemented in csConfigManager. |
|
return a pointer to the dynamic config domain.
Implemented in csConfigManager. |
|
return the priority of the dynamic config domain.
Implemented in csConfigManager. |
|
return a pointer to a single config domain.
Implemented in csConfigManager. |
|
remove a configuration domain.
Implemented in csConfigManager. |
|
remove a configuration domain.
Implemented in csConfigManager. |
|
set the priority of a config domain.
Implemented in csConfigManager. |
|
set the priority of a config domain.
Implemented in csConfigManager. |
|
Change the dynamic domain. The given config object must already be registered with AddDomain(). Returns false if this is not the case. Implemented in csConfigManager. |
|
set the priority of the dynamic config domain.
Implemented in csConfigManager. |