Kinetis Bootloader Host  2.0.0
Host Tools for Kinetis devices
apps/elftosb/common/OptionContext.h
1 /*
2  * File: OptionContext.h
3  *
4  * Copyright (c) Freescale Semiconductor, Inc. All rights reserved.
5  * See included license file for license details.
6  */
7 #if !defined(_OptionContext_h_)
8 #define _OptionContext_h_
9 
10 #include <string>
11 #include "Value.h"
12 
13 namespace elftosb
14 {
19 {
20 public:
22  virtual ~OptionContext() {}
27  virtual bool hasOption(const std::string &name) const = 0;
28 
33  virtual const Value *getOption(const std::string &name) const = 0;
34 
42  virtual void setOption(const std::string &name, Value *value) = 0;
43 
46  virtual void deleteOption(const std::string &name) = 0;
47 };
48 
49 }; // namespace elftosb
50 
51 #endif // _OptionContext_h_
virtual ~OptionContext()
Make the dtor virtual.
Definition: apps/elftosb/common/OptionContext.h:22
virtual void setOption(const std::string &name, Value *value)=0
Adds or changes an option&#39;s value.
Definition: BootImage.h:13
virtual bool hasOption(const std::string &name) const =0
Detemine whether the named option is present in the table.
Abstract base class for values of arbitrary types.
Definition: apps/elftosb/common/Value.h:20
Pure abstract interface class to a table of options.
Definition: apps/elftosb/common/OptionContext.h:18
virtual const Value * getOption(const std::string &name) const =0
Returns the option&#39;s value.
virtual void deleteOption(const std::string &name)=0
Removes an option from the table.