Ghidra Decompiler Analysis Engine
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:
Inheritance graph
[legend]

Public Member Functions

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 OptionNamespaceStrategy, OptionMaxInstruction, OptionAliasBlock, OptionToggleRule, OptionJumpLoad, OptionSetLanguage, OptionProtoEval, OptionErrorTooManyInstructions, OptionErrorReinterpreted, OptionErrorUnimplemented, OptionIgnoreUnimplemented, OptionAllowContextSet, OptionCurrentAction, OptionSetAction, OptionIntegerFormat, OptionCommentInstruction, OptionCommentHeader, OptionCommentStyle, OptionCommentIndent, OptionIndentIncrement, OptionMaxLineWidth, OptionHideExtensions, OptionNoCastPrinting, OptionConventionPrinting, OptionInPlaceOps, OptionNullPrinting, OptionWarning, OptionStructAlign, OptionNoReturn, OptionInline, OptionForLoops, OptionInferConstPtr, OptionDefaultPrototype, OptionReadOnly, and OptionExtraPop.

◆ onOrOff()

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

Parse an "on" or "off" string.

If the parameter is "on" return true, if "off" return false. Any other value causes an exception.

Parameters
pis the parameter
Returns
the parsed boolean value

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