indra::base::config::IndraConfig Class Reference
List of all members.
Detailed Description
IndraConfig loads a 'indra' xml configuration file
and loads into memory. This representation in memory
can get updated to overwrite values or add new values.
The xml configuration file is considered a live file and changes
to the file are checked and reloaded periodically. If a value had
been overwritten via the update or set method, the loaded values
from the file are ignored (the values from the update/set methods
override)
Definition at line 40 of file config.py.
Member Function Documentation
def indra::base::config::IndraConfig::__init__ |
( |
|
self, |
|
|
|
indra_config_file | |
|
) |
| | |
def indra::base::config::IndraConfig::_load |
( |
|
self |
) |
[private] |
def indra::base::config::IndraConfig::_get_last_modified_time |
( |
|
self |
) |
[private] |
Returns the mtime (last modified time) of the config file,
if such exists.
Definition at line 76 of file config.py.
def indra::base::config::IndraConfig::_combine_dictionaries |
( |
|
self |
) |
[private] |
def indra::base::config::IndraConfig::_reload_if_necessary |
( |
|
self |
) |
[private] |
def indra::base::config::IndraConfig::__getitem__ |
( |
|
self, |
|
|
|
key | |
|
) |
| | |
def indra::base::config::IndraConfig::get |
( |
|
self, |
|
|
|
key, |
|
|
|
default = None | |
|
) |
| | |
def indra::base::config::IndraConfig::__setitem__ |
( |
|
self, |
|
|
|
key, |
|
|
|
value | |
|
) |
| | |
Sets the value of the config setting of key to be newval
Once any key/value pair is changed via the set method,
that key/value pair will remain set with that value until
change via the update or set method
Definition at line 127 of file config.py.
def indra::base::config::IndraConfig::set |
( |
|
self, |
|
|
|
key, |
|
|
|
newval | |
|
) |
| | |
def indra::base::config::IndraConfig::update |
( |
|
self, |
|
|
|
new_conf | |
|
) |
| | |
Load an XML file and apply its map as overrides or additions
to the existing config. Update can be a file or a dict.
Once any key/value pair is changed via the update method,
that key/value pair will remain set with that value until
change via the update or set method
Definition at line 141 of file config.py.
def indra::base::config::IndraConfig::as_dict |
( |
|
self |
) |
|
Returns immutable copy of the IndraConfig as a dictionary
Definition at line 161 of file config.py.
Member Data Documentation
The documentation for this class was generated from the following file: