Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

Config Class Reference

Interface for all class which want to give access to configuration data. More...

Inheritance diagram for Config:

Inheritance graph
[legend]
List of all members.

Public Member Functions


Detailed Description

Interface for all class which want to give access to configuration data.


Member Function Documentation

Object getOption Object  scope,
String  name,
Object  defaultValue
 

Get previously stored option.

Parameters:
scope Object which describe scope.for config option.
name Name of configuration option.
defaultValue Object which will be returned when value with name name wasn't stored in Config.
Returns:
Value stored in configuration in key name, or null when value with this key was not stored.

Reimplemented in ConfigFile, and MultiConfigCompositor.

bool hasOption Object  scope,
String  name
 

Check that option of this name exists.

Parameters:
scope Object which describe scope.for config option.
name Name of configuration option.
Returns:
true if option of name name exists, false otherwise.

Reimplemented in ConfigFile, and MultiConfigCompositor.

Object registerListener Object  scope,
String  name,
ConfigChangeListener  listener,
Object  token
 

Add change listener to this object.

Parameters:
scope Object which describe scope.for config option.
name Name of config option, information abouts its chages will be passed to listener.
listener Listener object to add.
token Opaque value passed as last argument to onConfigChange() method.
Returns:
Object which can be used to remove listener. Should be passed as token argument ot unregisterListener() method.

Reimplemented in MultiConfigCompositor.

void removeOption Object  scope,
String  name
 

Remove config option.

Parameters:
scope Object which describe scope.for config option.
name Name of configuration option.

Reimplemented in ConfigFile, and MultiConfigCompositor.

void setOption Object  scope,
String  name,
Object  value
 

Set value of option.

Parameters:
scope Object which describe scope.for config option.
name Name of configuration option.
value Value to store

Reimplemented in ConfigFile, and MultiConfigCompositor.

void unregisterListener Object  token  ) 
 

Remove config option change listener.

Parameters:
token Object returned by registerListener() method.

Reimplemented in ConfigFile, and MultiConfigCompositor.


The documentation for this class was generated from the following file:
Generated on Tue Jan 4 01:03:49 2005 for JabberZilla by  doxygen 1.4.0