indra::base::config::IndraConfig Class Reference

List of all members.

Public Member Functions

def __init__
def __getitem__
def get
def __setitem__
def set
def update
def as_dict

Private Member Functions

def _load
def _get_last_modified_time
def _combine_dictionaries
def _reload_if_necessary

Private Attributes

 _indra_config_file
 _reload_check_interval
 _last_check_time
 _last_mod_time
 _config_overrides
 _config_file_dict
 _combined_dict


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 
)

Definition at line 52 of file config.py.

def indra::base::config::IndraConfig::_load (   self  )  [private]

Definition at line 64 of file config.py.

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]

Definition at line 86 of file config.py.

def indra::base::config::IndraConfig::_reload_if_necessary (   self  )  [private]

Definition at line 91 of file config.py.

def indra::base::config::IndraConfig::__getitem__ (   self,
  key 
)

Definition at line 116 of file config.py.

def indra::base::config::IndraConfig::get (   self,
  key,
  default = None 
)

Definition at line 121 of file config.py.

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 
)

Definition at line 138 of file config.py.

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

Definition at line 53 of file config.py.

Definition at line 54 of file config.py.

Definition at line 55 of file config.py.

Definition at line 56 of file config.py.

Definition at line 58 of file config.py.

Definition at line 59 of file config.py.

Definition at line 60 of file config.py.


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

Generated on Fri May 16 09:42:23 2008 for SecondLife by  doxygen 1.5.5