![]() |
![]() |
This is the abstract class to overload to create new backend tools. More...
#include <cbackend.h>
Public Member Functions | |
virtual char * | GetToolName (void)=0 |
map of switch to its description More... | |
virtual char * | GetToolDescription (void)=0 |
Access method for tool description use in vrq help. More... | |
virtual int | AcceptAllPlusArgs (void) |
Override this method if the plugin accepts arbitrary plusargs: ie +argName[=argValue] or +argName[+argValue]. More... | |
virtual list< string > & | GetSwitches (void) |
Access method for list of switches. More... | |
virtual const char * | GetSwitchDescription (const char *sw) |
Method to get the help text for a switch using the switch name as a key. More... | |
virtual void | RegisterSwitch (const char *switchName, const char *description) |
Method shortcut to register tool switches with vrq's help system. More... | |
virtual int | RequireModuleResolution () |
Method to control if plugin requires all module definitions to be resolved. More... | |
virtual int | ResolveModules ()=0 |
Method to control if plugin enables all module definitions to be searched for returns true if tool enables module definitions to be resolved. More... | |
virtual int | ResolveInstance (CModule *module, CInstance *inst)=0 |
Method to control the resolution of individual module instances. More... | |
virtual int | HideTool () |
Method to control if plugin should be hidden, in this case it will not appear in the help but will it still be possible to invoke it. More... | |
virtual int | IgnoreVrqComments () |
Method to control how parser handles vrq comment based pragmas: ie // vrq translate_on/off Note: the default behavior is to not ignore vrq comment based pragmas. More... | |
virtual void | Activate ()=0 |
Method to initialize the plugin. More... | |
virtual void | Logfile (FILE *logfile) |
Pass current open logfile to plugin. More... | |
virtual void | Process (list< CElement > &inputList, list< CElement > &outputList)=0 |
Method to implement plugin function. More... | |
Protected Attributes | |
list< string > | switches |
map< string, string > | switchDescription |
list of plugin command line switches More... | |
This is the abstract class to overload to create new backend tools.
Each tool should create a subclass of this and either add it to the toolList in main.cc or compile it as a standalone DLL and place it in a plugin directory.
This class and its methods will fully integrate the plugin in to vrq. Note not all methods are abstract. For methods where reasonable defaults make sense, a default implementation is defined. If a different behavior is desired the subclass should override the default virtual method.
Note: Plugins should directly store information about the switches they support in the protected instance variables: switches and switchDescription.
|
inlinevirtual |
Override this method if the plugin accepts arbitrary plusargs: ie +argName[=argValue] or +argName[+argValue].
|
pure virtual |
Method to initialize the plugin.
This method will be called once before tool is invoked.
|
inlinevirtual |
Method to get the help text for a switch using the switch name as a key.
Generally this method need not be overriden.
sw | pointer to switch. |
|
inlinevirtual |
Access method for list of switches.
Generally this method need not be overridden.
|
pure virtual |
Access method for tool description use in vrq help.
|
pure virtual |
map of switch to its description
Access method for tool name
|
inlinevirtual |
Method to control if plugin should be hidden, in this case it will not appear in the help but will it still be possible to invoke it.
This is useful for development of plugins that care currently unstable. Note: the default behavior is to make the plugin visible.
|
inlinevirtual |
Method to control how parser handles vrq comment based pragmas: ie // vrq translate_on/off Note: the default behavior is to not ignore vrq comment based pragmas.
|
inlinevirtual |
Pass current open logfile to plugin.
|
pure virtual |
Method to implement plugin function.
Input list is processed and output list is generated. Dimensions of input list must be > 0. Dimensions of output list must be >= 0. Input and output list dimensions need not match. This method may terminate processing early by throwing an exception that is a subclass of CBackendException. Note throwing an exeception and exiting normally is equivilent to throwing a CBackendExit.
inputList | a list of compilation units to process. |
outputList | a list of compilation units processed. |
|
inlinevirtual |
Method shortcut to register tool switches with vrq's help system.
switchName | switch string |
description | switch description used for help text. |
|
inlinevirtual |
Method to control if plugin requires all module definitions to be resolved.
returns true if tool requires all module definitions to be resolved.
Method to control the resolution of individual module instances.
module | to the module that contains the instance. |
inst | pointer to the instance to be resolved. |
|
pure virtual |
Method to control if plugin enables all module definitions to be searched for returns true if tool enables module definitions to be resolved.
|
protected |
list of plugin command line switches
|
protected |