Options Class Reference

Options implements a class for parsing option files. More...

List of all members.

Public Functions

public Options new (string optfile)
 Creates a new Options object checking optfile.
public anonHash getCompleteConfig ()
 Parses the whole configuration file and returns it as a anonymous perl hash.
public string getProperty (string attributeName)
 Searches attributeName in the configuration file and retunes the value pre and post whitespace deleted or sets Merror.

Private Functions

private void splitCfgLine (string line, anonHash hashRef)
 Splits a configuration line refrenced by line into a hierarchic anonHash hashRef.
private string delWhitespaces (string what)
 Deletes all leading and trainling whitespaces from what.
private void checkOptfile ()
 Checks if a optionfile is given and if it is readable.


Detailed Description

Options implements a class for parsing option files.

Member Function Documentation

private string Options::delWhitespaces ( string  what  ) 

Deletes all leading and trainling whitespaces from what.

Parameters:
what String where to delete
Returns:
A leading and trainling whitespaces cleaned string

public anonHash Options::getCompleteConfig (  ) 

Parses the whole configuration file and returns it as a anonymous perl hash.

Returns:
cfgHash A anonymous perl hash mapping the hierarchic options structure

public string Options::getProperty ( string  attributeName  ) 

Searches attributeName in the configuration file and retunes the value pre and post whitespace deleted or sets Merror.

Parameters:
attributeName The attribute name
Returns:
The value of attribute referenced through attributeName or an empty string

public Options Options::new ( string  optfile  ) 

Creates a new Options object checking optfile.

Parameters:
optfile String defining the path to the optionfile to use
Returns:
Options Returns a new Options object

private void Options::splitCfgLine ( string  line,
anonHash  hashRef 
)

Splits a configuration line refrenced by line into a hierarchic anonHash hashRef.

Parameters:
line A string holding the actual configurationfile line
hashRef A hash reference where the structure will be mapped


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

Generated on Tue Feb 16 00:54:58 2010 for Options by  doxygen 1.5.8