rcPreferencesManager Class Reference

Class for managing the preferences. More...

List of all members.

Public Member Functions

def __init__
 rcPreferencesManager constructor
def loadConfig
 Parse and load the configuration file.
def writeConfig
 Write the configuration back to the file.
def preferences
 Retrieve the preferences.
def defPrefs
 Retrive the default preferences.
def getConfigFile
 Retrieve the configuration file name.
def refreshPrefs
 Refresh the preferences from newPrefs.
def setPref
 Set a preference value.
def parserToPrefs
 Populate preferences from the parser.
def prefsToParser
 Populate the parser from the preferences.
def processLastItem
 Retrieve the last item of a preference and update the parser.
def loadDefaults
 Load default preferences in to the parser.
def isnumeric
 Determine whether the passed string is numeric.
def setOperator
 Set the current operator and update the configuration file.
def setParticleType
 Set the particle type and update the configuration file.
def setOrientation
 Set the orientatino and update the configuration file.
def setSite
 Set the site and update the configuration file.
def setPhase
 Set the phase and update the configuration file.
def setInstrumentType
 Set the instrument type and update the configuration file.
def userId
 Get the user id.


Detailed Description

Class for managing the preferences.

Definition at line 31 of file rcPreferencesManager.py.


Member Function Documentation

def __init__   self,
  configFile
 

rcPreferencesManager constructor

Parameters:
configFile Configuration file name

Definition at line 33 of file rcPreferencesManager.py.

def defPrefs   self  ) 
 

Retrive the default preferences.

Returns:
Default preferences

Definition at line 91 of file rcPreferencesManager.py.

def getConfigFile   self  ) 
 

Retrieve the configuration file name.

Returns:
Configuration file name

Definition at line 98 of file rcPreferencesManager.py.

def isnumeric   self,
  str
 

Determine whether the passed string is numeric.

Returns:
False if str is not numeric. True if str is numeric.

Definition at line 287 of file rcPreferencesManager.py.

def loadConfig   self  ) 
 

Parse and load the configuration file.

Returns:
1

Definition at line 45 of file rcPreferencesManager.py.

def loadDefaults   self,
  currentDir
 

Load default preferences in to the parser.

Returns:
ConfigParser instance

Definition at line 248 of file rcPreferencesManager.py.

def parserToPrefs   self,
  confParser,
  prefs = {}
 

Populate preferences from the parser.

Parameters:
confParser ConfigParser instance
prefs Preferences instance
Returns:
Preferences instance

Definition at line 120 of file rcPreferencesManager.py.

def preferences   self  ) 
 

Retrieve the preferences.

Returns:
Preferences instance.

Definition at line 84 of file rcPreferencesManager.py.

def prefsToParser   self  ) 
 

Populate the parser from the preferences.

Returns:
ConfigParser instance

Definition at line 188 of file rcPreferencesManager.py.

def processLastItem   self,
  option,
  item,
  confParser
 

Retrieve the last item of a preference and update the parser.

Parameters:
option Preference option name
item Preference name for the last item
confParser ConfigParser instance

Definition at line 233 of file rcPreferencesManager.py.

def refreshPrefs   self,
  newPrefs
 

Refresh the preferences from newPrefs.

Definition at line 105 of file rcPreferencesManager.py.

def setInstrumentType   self,
  instrumentType
 

Set the instrument type and update the configuration file.

Parameters:
instrumentType Instrument type

Definition at line 348 of file rcPreferencesManager.py.

def setOperator   self,
  operator
 

Set the current operator and update the configuration file.

Parameters:
operator Operator name

Definition at line 296 of file rcPreferencesManager.py.

def setOrientation   self,
  orientation
 

Set the orientatino and update the configuration file.

Parameters:
orientation Orientation

Definition at line 321 of file rcPreferencesManager.py.

def setParticleType   self,
  particleType
 

Set the particle type and update the configuration file.

Parameters:
particleType Particle type

Definition at line 312 of file rcPreferencesManager.py.

def setPhase   self,
  phase
 

Set the phase and update the configuration file.

Parameters:
phase Phase

Definition at line 339 of file rcPreferencesManager.py.

def setPref   self,
  keyword,
  value
 

Set a preference value.

Parameters:
keyword Preference keyword
value Preference value

Definition at line 112 of file rcPreferencesManager.py.

def setSite   self,
  site
 

Set the site and update the configuration file.

Parameters:
site Site

Definition at line 330 of file rcPreferencesManager.py.

def userId   self  ) 
 

Get the user id.

Definition at line 358 of file rcPreferencesManager.py.

def writeConfig   self  ) 
 

Write the configuration back to the file.

Definition at line 73 of file rcPreferencesManager.py.


The documentation for this class was generated from the following file:
Generated on Thu Apr 27 20:53:27 2006 for LICOS L02-01-00 by doxygen 1.4.6-NO