apps/elftosb/common/OptionContext.h
/*
* File: OptionContext.h
*
* Copyright (c) Freescale Semiconductor, Inc. All rights reserved.
* See included license file for license details.
*/
#if !defined(_OptionContext_h_)
#define _OptionContext_h_
#include <string>
#include "Value.h"
namespace elftosb
{
class OptionContext
{
public:
virtual ~OptionContext() {}
virtual bool hasOption(const std::string &name) const = 0;
virtual const Value *getOption(const std::string &name) const = 0;
virtual void setOption(const std::string &name, Value *value) = 0;
virtual void deleteOption(const std::string &name) = 0;
};
}; // namespace elftosb
#endif // _OptionContext_h_
elftosb::OptionContext::~OptionContext
virtual ~OptionContext()
Make the dtor virtual.
Definition: apps/elftosb/common/OptionContext.h:22
elftosb::OptionContext::setOption
virtual void setOption(const std::string &name, Value *value)=0
Adds or changes an option&#39;s value.
elftosb
Definition: BootImage.h:13
elftosb::OptionContext::hasOption
virtual bool hasOption(const std::string &name) const =0
Detemine whether the named option is present in the table.
elftosb::Value
Abstract base class for values of arbitrary types.
Definition: apps/elftosb/common/Value.h:20
elftosb::OptionContext
Pure abstract interface class to a table of options.
Definition: apps/elftosb/common/OptionContext.h:18
elftosb::OptionContext::getOption
virtual const Value * getOption(const std::string &name) const =0
Returns the option&#39;s value.
elftosb::OptionContext::deleteOption
virtual void deleteOption(const std::string &name)=0
Removes an option from the table.