decompiler  1.0.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Private Member Functions | List of all members
CapabilityPoint Class Referenceabstract

Class for automatically registering extension points to the decompiler. More...

#include <capability.hh>

Inheritance diagram for CapabilityPoint:
ArchitectureCapability GhidraCapability PrintLanguageCapability BfdArchitectureCapability RawBinaryArchitectureCapability XmlArchitectureCapability GhidraDecompCapability PrintCCapability PrintJavaCapability

Public Member Functions

virtual ~CapabilityPoint (void)
 Destructor.
 
virtual void initialize (void)=0
 Complete initialization of an extension point. More...
 

Static Public Member Functions

static void initializeAll (void)
 Finish initialization for all extension points. More...
 

Protected Member Functions

 CapabilityPoint (void)
 Construct extension capability exactly once. More...
 

Static Private Member Functions

static vector< CapabilityPoint * > & getList (void)
 Retrieve the list of extension point singletons. More...
 

Detailed Description

Class for automatically registering extension points to the decompiler.

This uses the C++ static initializer feature to automatically discover and register extension point. Code for an extension should provide a class that derives from CapabilityPoint and overrides the initialize() method. Additionally there should be a singleton static instantiation of this extension class. The extensions are accumulated in a list automatically, then the decompiler engine will ensure that the initialize() method is called on each extension, allowing it to complete its integration.

Constructor & Destructor Documentation

CapabilityPoint::CapabilityPoint ( void  )
protected

Construct extension capability exactly once.

Constructing the object automatically registers it. For global instances, this happens during static initialization

References getList().

Member Function Documentation

vector< CapabilityPoint * > & CapabilityPoint::getList ( void  )
staticprivate

Retrieve the list of extension point singletons.

Access static vector of CapabilityPoint objects that are registered during static initialization The list itself is created once on the first call to this method after all the static initializers have run

Returns
the list of registered extensions

Referenced by CapabilityPoint(), and initializeAll().

virtual void CapabilityPoint::initialize ( void  )
pure virtual

Complete initialization of an extension point.

This method is implemented by each extension so it can do specialized integration

Implemented in ArchitectureCapability, GhidraDecompCapability, and PrintLanguageCapability.

Referenced by GhidraDecompCapability::GhidraDecompCapability(), and initializeAll().

void CapabilityPoint::initializeAll ( void  )
static

Finish initialization for all extension points.

Give all registered capabilities a chance to initialize (after all static initialization has happened)

References getList(), and initialize().

Referenced by GhidraDecompCapability::initialize().


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