elftosb::OptionContext Class Referenceabstract

Pure abstract interface class to a table of options. More...

`#include <OptionContext.h>`

Inheritance diagram for elftosb::OptionContext:
[legend]

## Public Member Functions

virtual | ~OptionContext ()
| Make the dtor virtual.
virtual bool | hasOption (const std::string &name) const =0
| Detemine whether the named option is present in the table. More...
virtual const Value * | getOption (const std::string &name) const =0
| Returns the option's value. More...
virtual void | setOption (const std::string &name, Value *value)=0
| Adds or changes an option's value. More...
virtual void | deleteOption (const std::string &name)=0
| Removes an option from the table. More...

## Detailed Description

Pure abstract interface class to a table of options.

## Member Function Documentation

virtual void elftosb::OptionContext::deleteOption | ( | const std::string & | name | ) |

pure virtual

Removes an option from the table.

Parameters

  name | The name of the option to remove.

Implemented in elftosb::OptionDictionary.

virtual const Value* elftosb::OptionContext::getOption | ( | const std::string & | name | ) | const

pure virtual

Returns the option's value.

Parameters

  name | The name of the option.

Returns
  The value for the option named name.

Return values

  NULL | No option is in the table with that name.

Implemented in elftosb::OptionDictionary.

virtual bool elftosb::OptionContext::hasOption | ( | const std::string & | name | ) | const

pure virtual

Detemine whether the named option is present in the table.

Parameters

  name | The name of the option to query.

Return values

  true | The option is present and has a value.
  false | No option with that name is in the table.

Implemented in elftosb::OptionDictionary.

virtual void elftosb::OptionContext::setOption | ( | const std::string & | name,
|  | Value * | value
| ) |  |

pure virtual

Adds or changes an option's value.

If the option was not already present in the table, it is added. Otherwise the old value is replaced.

Parameters

  name | The option's name.
  value | New value for the option.

Implemented in elftosb::OptionDictionary.

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

- apps/elftosb/common/OptionContext.h