decompiler
1.0.0
|
Base class for options classes that affect the configuration of the Architecture object. More...
#include <options.hh>
Public Member Functions | |
string | getName (void) const |
Return the name of the option. | |
virtual string | apply (Architecture *glb, const string &p1, const string &p2, const string &p3) const =0 |
Apply a particular configuration option to the Architecture. More... | |
Static Public Member Functions | |
static bool | onOrOff (const string &p) |
Parse an "on" or "off" string. More... | |
Protected Attributes | |
string | name |
Name of the option. | |
Base class for options classes that affect the configuration of the Architecture object.
Each class instance affects configuration through its apply() method, which is handed the Architecture object to be configured along with string based parameters. The apply() methods are run once during initialization of the Architecture object.
|
pure virtual |
Apply a particular configuration option to the Architecture.
This method is overloaded by the different Option classes to provide possible configuration of different parts of the Architecture. The user can provide up to three optional parameters to tailor a specific type of configuration. The method returns a confirmation/failure message as feedback.
glb | is the Architecture being configured |
p1 | is the first optional configuration string |
p2 | is the second optional configuration string |
p3 | is the third optional configuration string |
Implemented in OptionToggleRule, OptionJumpLoad, OptionSetLanguage, OptionProtoEval, OptionErrorTooManyInstructions, OptionErrorReinterpreted, OptionErrorUnimplemented, OptionIgnoreUnimplemented, OptionAllowContextSet, OptionCurrentAction, OptionSetAction, OptionIntegerFormat, OptionCommentInstruction, OptionCommentHeader, OptionCommentStyle, OptionCommentIndent, OptionIndentIncrement, OptionMaxLineWidth, OptionNoCastPrinting, OptionConventionPrinting, OptionInPlaceOps, OptionNullPrinting, OptionWarning, OptionStructAlign, OptionNoReturn, OptionInline, OptionInferConstPtr, OptionDefaultPrototype, OptionReadOnly, and OptionExtraPop.
Referenced by OptionDatabase::set().
|
static |
Parse an "on" or "off" string.
If the parameter is "on" return true, if "off" return false. Any other value causes an exception.
p | is the parameter |
Referenced by OptionReadOnly::apply(), OptionInferConstPtr::apply(), OptionWarning::apply(), OptionNullPrinting::apply(), OptionInPlaceOps::apply(), OptionConventionPrinting::apply(), OptionNoCastPrinting::apply(), OptionCommentHeader::apply(), OptionCommentInstruction::apply(), OptionCurrentAction::apply(), OptionAllowContextSet::apply(), OptionIgnoreUnimplemented::apply(), OptionErrorUnimplemented::apply(), OptionErrorReinterpreted::apply(), OptionErrorTooManyInstructions::apply(), OptionJumpLoad::apply(), and OptionToggleRule::apply().