Kinetis Bootloader Host  2.0.0
Host Tools for Kinetis devices
elftosb::OptionContext Class Referenceabstract

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

#include <OptionContext.h>

+ Inheritance diagram for elftosb::OptionContext:

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 ValuegetOption (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
nameThe 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
nameThe name of the option.
Returns
The value for the option named name.
Return values
NULLNo 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
nameThe name of the option to query.
Return values
trueThe option is present and has a value.
falseNo 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
nameThe option's name.
valueNew value for the option.

Implemented in elftosb::OptionDictionary.


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