decompiler
1.0.0
|
Base class for high-level language capabilities. More...
#include <printlanguage.hh>
Public Member Functions | |
const string & | getName (void) const |
Get the high-level language name. | |
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... | |
Public Member Functions inherited from CapabilityPoint | |
virtual | ~CapabilityPoint (void) |
Destructor. | |
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. | |
Static Private Attributes | |
static vector< PrintLanguageCapability * > | thelist |
The static array of registered high-level languages. | |
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.
Referenced by Architecture::Architecture(), getName(), and Architecture::setPrintLanguage().
|
static |
Find a language capability by name.
name | is the language name to search for |
References getName(), name, and thelist.
Referenced by getName(), and Architecture::setPrintLanguage().
|
static |
Retrieve the default language capability.
This retrieves the capability with its isdefault field set or the first capability registered.
References thelist.
Referenced by Architecture::Architecture(), and getName().
|
virtual |
Complete initialization of an extension point.
This method is implemented by each extension so it can do specialized integration
Implements CapabilityPoint.
References isdefault, and thelist.
Referenced by getName().