decompiler  1.0.0
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
ArchOption Class Referenceabstract

Base class for options classes that affect the configuration of the Architecture object. More...

#include <options.hh>

Inheritance diagram for ArchOption:
OptionAllowContextSet OptionCommentHeader OptionCommentIndent OptionCommentInstruction OptionCommentStyle OptionConventionPrinting OptionCurrentAction OptionDefaultPrototype OptionErrorReinterpreted OptionErrorTooManyInstructions OptionErrorUnimplemented OptionExtraPop OptionIgnoreUnimplemented OptionIndentIncrement OptionInferConstPtr OptionInline OptionInPlaceOps OptionIntegerFormat OptionJumpLoad OptionMaxLineWidth OptionNoCastPrinting OptionNoReturn OptionNullPrinting OptionProtoEval OptionReadOnly OptionSetAction OptionSetLanguage OptionStructAlign OptionToggleRule OptionWarning

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.
 

Detailed Description

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.

Member Function Documentation

◆ apply()

virtual string ArchOption::apply ( Architecture glb,
const string &  p1,
const string &  p2,
const string &  p3 
) const
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.

Parameters
glbis the Architecture being configured
p1is the first optional configuration string
p2is the second optional configuration string
p3is the third optional configuration string
Returns
a confirmation/failure message

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().

◆ onOrOff()

bool ArchOption::onOrOff ( const string &  p)
static

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