class HT_Option_Table
This is the linked list of configuration options.

 It is typically not used by applications.

See Also
HT_Option, HT_Option_Definition
Methods
add
Adds an option to the beginning of the table.
find
Locates an entry in the table by its name.
first
Returns the first definition in the table.
inherit
Imports the global scope options of a given table into this table, if those options have been set.
next
Returns the next definition in the table.
set
Imports the set options of a given table into this table.
unset
Resets each option in the table.
copy
Makes a copy of the table.
Constructor/Destructor
HT_Option_Table
Constructs an option table.
~HT_Option_Table
Destroys an option table.

HT_Option_Table::add

Purpose

Adds an option to the beginning of the table. Synopsis
HT_Option * add(HT_Option const & option)
Details A new option object is created and added to the table. The new object is initialized with the parameters of the object passed in option.
HT_Option_Table::find

Purpose

Locates an entry in the table by its name. Synopsis
HT_Option * find(HT_String const & name)
Details The option table is searched by the name passed in name. If the option is found in the table, a pointer to the option is returned, otherwise NULL is returned.
 
 

HT_Option_Table::first

Purpose

Returns the first option in the table. Synopsis
HT_Option * first()
Details The first entry in the option table is returned. If the table is empty, NULL is returned.

This method should be called before any calls to next() are made.
 
 


HT_Option_Table::HT_Option_Table

Purpose

Creates an option table either from scratch or by copying another table. Synopsis
HT_Option_Table ()
HT_Option_Table (HT_Option_Table const & table)
Details The first creation method creates an empty option table.

The second creation method creates an option table by copying all entries from the option table provided as the argument table.
 
 


HT_Option_Table::~HT_Option_Table

Purpose

Destroys an option table. Synopsis
~HT_Option_Table ()
Details Deletes each option in the table and frees up the option table storage.
 
 

HT_Option_Table::inherit

Purpose

Imports the global scope options of a given table into this table, if those options have been set. Synopsis
void inherit(HT_Option_Table const & tbl)
Details The table passed in the parameter tbl is iterated. For each entry in tbl that is global, a search is done for a corresponding option in this table. For each of those matching options, if the value of the option in tbl has been set, the corresponding option in this table is set to the same value. Options that are in tbl, but not found in this table are added into this table, but marked as unset.
 
 

HT_Option_Table::next

Purpose

Returns the next option in the table. Synopsis
HT_Option * next()
Details The next entry in the option table is returned. If the end of the table has been reached, null is returned.

The first() method should be called before any calls to next() are made.
 
 


HT_Option_Table::set

Purpose

Imports the set options of a given table into this table. Synopsis
void set(HT_Option_Table const & tbl)
Details The table passed in the parameter tbl is iterated. For each entry in tbl that is set, a search is done for a corresponding option in this table. For each of those matching options, the corresponding option in this table is set to the same value. Options that are in tbl, but not found in this table are added to this table, along with the corresponding values.
 
 

HT_Option_Table::unset

Purpose

Resets each option in the table. Synopsis
void unset(void)
Details The table is iterated and all option values in the table are marked as not having been set.
 
 

HT_Option_Table::copy

Purpose

Makes a copy of the table. Synopsis
HT_Counted * copy (void)
Details Each option in the table is copied into a new table.