Ghidra Decompiler Analysis Engine
|
Base class for high-level language capabilities. More...
#include <printlanguage.hh>
Public Member Functions | |
virtual void | initialize (void) |
Complete initialization of an extension point. More... | |
virtual PrintLanguage * | buildLanguage (Architecture *glb)=0 |
Build the main PrintLanguage object corresponding to this capability. More... | |
Static Public Member Functions | |
static PrintLanguageCapability * | getDefault (void) |
Retrieve the default language capability. More... | |
static PrintLanguageCapability * | findCapability (const string &name) |
Find a language capability by name. More... | |
Static Public Member Functions inherited from CapabilityPoint | |
static void | initializeAll (void) |
Finish initialization for all extension points. More... | |
Protected Attributes | |
string | name |
Unique identifier for language capability. | |
bool | isdefault |
Set to true to treat this as the default language. | |
Additional Inherited Members | |
Protected Member Functions inherited from CapabilityPoint | |
CapabilityPoint (void) | |
Construct extension capability exactly once. More... | |
Base class for high-level language capabilities.
This class is overridden to introduce a new high-level language back-end to the system. A static singleton is instantiated to automatically register the new capability with the system. A static array keeps track of all the registered capabilities.
The singleton is registered with a name, which the user can use to select the language, and it acts as a factory for the main language printing class for the capability, which must be derived from PrintLanguage. The factory method for the capability to override is buildLanguage().
|
pure virtual |
Build the main PrintLanguage object corresponding to this capability.
An Architecture will call this once. All decompiling from this Architecture will use this same emitter.
glb | is the Architecture that will own the new emitter |
Implemented in PrintCCapability, and PrintJavaCapability.
|
static |
Find a language capability by name.
name | is the language name to search for |
|
static |
Retrieve the default language capability.
This retrieves the capability with its isdefault field set or the first capability registered.
|
virtual |
Complete initialization of an extension point.
This method is implemented by each extension so it can do specialized integration
Implements CapabilityPoint.