option_file_scan_t Class Reference
[Run-Time Options]

Inherits w_base_t.

Inheritance diagram for option_file_scan_t:

Inheritance graph
[legend]
Collaboration diagram for option_file_scan_t:

Collaboration graph
[legend]
List of all members.

Detailed Description

Scan a text file for options. See Run-Time Options.

Each line of the file is either a comment or an option value setting.

A comment line begins with "!" or "#".

An option value setting line has the form: level1.level2.optionname: value of option

level1.level2.optionname is anything acceptable to option_group_t::lookup_by_class(). The value of the option is the string beginning with the first non-white space character after the ":" and ending with last non-white space character in the line.

Examples:

init_config_options.cpp, and startstop.cpp.

Definition at line 431 of file option.h.

Public Member Functions

NORET option_file_scan_t (const char *opt_file_path, option_group_t *opt_group)
NORET ~option_file_scan_t ()
w_rc_t scan (bool over_ride, ostream &err_stream, bool exact=false, bool mismatch_ok=false)
 Scan all options, report errors to err_stream.

Protected Attributes

const char * _fileName
option_group_t_optList


Member Function Documentation

w_rc_t option_file_scan_t::scan ( bool  over_ride,
ostream &  err_stream,
bool  exact = false,
bool  mismatch_ok = false 
)

Scan all options, report errors to err_stream.

Parameters:
[in] over_ride If false, new values of options will be ignored. If true, assignments to already-set options will be made.
[out] err_stream Send error message here if non-NULL.
[in] exact If true, misspellings or abbreviations of option names in the instream will result in errors.
[in] mismatch_ok If true, bad option names will be ignored and will not cause failure of the entire scan.
Examples:
init_config_options.cpp.

Definition at line 1010 of file option.cpp.

References _fileName, _optList, DBG, RC, option_stream_scan_t::scan(), and option_stream_scan_t::setLabel().

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Wed Jul 7 17:22:43 2010 for Shore Storage Manager by  doxygen 1.4.7