<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>vrq: CBackend Class Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> <table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td width="180"><a href="index.html"><img src="vrq.png" width="150" height="100" border="0" alt="vrq"></a></td> <td background="top_bg.png" align="right" width="100%"> <img src="glyth.png" width="500" height="100" border="0" alt=""> </td> </tr> <tr> <td background="#FFFFFF" align="right" width="50" height="4"></td> </tr> </table> </head><body> <!-- Generated by Doxygen 1.7.1 --> <div class="navigation" id="top"> <div class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> | <a href="#pro-attribs">Protected Attributes</a> </div> <div class="headertitle"> <h1>CBackend Class Reference</h1> </div> </div> <div class="contents"> <!-- doxytag: class="CBackend" --> <p>This is the abstract class to overload to create new backend tools. <a href="#_details">More...</a></p> <p><code>#include <<a class="el" href="cbackend_8h_source.html">cbackend.h</a>></code></p> <p><a href="classCBackend-members.html">List of all members.</a></p> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classCBackend.html#a0de276c9fc23c4abe52c7407c8aee8ab">GetToolName</a> (void)=0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">map of switch to its description <a href="#a0de276c9fc23c4abe52c7407c8aee8ab"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classCBackend.html#a157dec831229604dc32a64a7332959b2">GetToolDescription</a> (void)=0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Access method for tool description use in vrq help. <a href="#a157dec831229604dc32a64a7332959b2"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classCBackend.html#a36b29adef17eda48d42a661665d2c851">AcceptAllPlusArgs</a> (void)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Override this method if the plugin accepts arbitrary plusargs: ie +argName[=argValue] or +argName[+argValue]. <a href="#a36b29adef17eda48d42a661665d2c851"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual list< string > & </td><td class="memItemRight" valign="bottom"><a class="el" href="classCBackend.html#a8cac4846905cfecbbd5a87af8030923b">GetSwitches</a> (void)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Access method for list of switches. <a href="#a8cac4846905cfecbbd5a87af8030923b"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classCBackend.html#a20f866dfe69bd1d73ba4f919dd5e7290">GetSwitchDescription</a> (const char *sw)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Method to get the help text for a switch using the switch name as a key. <a href="#a20f866dfe69bd1d73ba4f919dd5e7290"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classCBackend.html#ad24fdef8ec7199099f594d45b8ff1738">RegisterSwitch</a> (const char *switchName, const char *description)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Method shortcut to register tool switches with vrq's help system. <a href="#ad24fdef8ec7199099f594d45b8ff1738"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classCBackend.html#af3dede7025f3d6647a93529242e06709">RequireModuleResolution</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Method to control if plugin requires all module definitions to be resolved. <a href="#af3dede7025f3d6647a93529242e06709"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classCBackend.html#a3b5802632eccaab19f8c9b691de06b84">ResolveModules</a> ()=0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Method to control if plugin enables all module definitions to be searched for returns true if tool enables module definitions to be resolved. <a href="#a3b5802632eccaab19f8c9b691de06b84"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classCBackend.html#af82919cc5d2da30361078cc13bf71ec9">ResolveInstance</a> (<a class="el" href="classCModule.html">CModule</a> *module, <a class="el" href="classCInstance.html">CInstance</a> *inst)=0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Method to control the resolution of individual module instances. <a href="#af82919cc5d2da30361078cc13bf71ec9"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classCBackend.html#a093309b720b69958c993de14eb040803">HideTool</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">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. <a href="#a093309b720b69958c993de14eb040803"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classCBackend.html#afade5208bdd60c6f381244d3a65fd44f">IgnoreVrqComments</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">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. <a href="#afade5208bdd60c6f381244d3a65fd44f"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classCBackend.html#a5fb7f8ac17c408e80eb7221d99fa4bdd">Activate</a> ()=0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Method to initialize the plugin. <a href="#a5fb7f8ac17c408e80eb7221d99fa4bdd"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classCBackend.html#a2562e4cfcc84c34f01db9372cbf86d6f">Process</a> (list< <a class="el" href="classCElement.html">CElement</a> > &inputList, list< <a class="el" href="classCElement.html">CElement</a> > &outputList)=0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Method to implement plugin function. <a href="#a2562e4cfcc84c34f01db9372cbf86d6f"></a><br/></td></tr> <tr><td colspan="2"><h2><a name="pro-attribs"></a> Protected Attributes</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">list< string > </td><td class="memItemRight" valign="bottom"><a class="el" href="classCBackend.html#a8b744fe29b1fb0a6bc4645238652c90c">switches</a></td></tr> <tr><td class="memItemLeft" align="right" valign="top">map< string, string > </td><td class="memItemRight" valign="bottom"><a class="el" href="classCBackend.html#ad72312994d56d43bdf34cf2ef63fab98">switchDescription</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">list of plugin command line switches <a href="#ad72312994d56d43bdf34cf2ef63fab98"></a><br/></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>This is the abstract class to overload to create new backend tools. </p> <p>Each tool should create a subclass of this and either add it to the toolList in <a class="el" href="main_8cc.html">main.cc</a> or compile it as a standalone DLL and place it in a plugin directory.</p> <p>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.</p> <p>Note: Plugins should directly store information about the switches they support in the protected instance variables: switches and switchDescription. </p> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="a36b29adef17eda48d42a661665d2c851"></a><!-- doxytag: member="CBackend::AcceptAllPlusArgs" ref="a36b29adef17eda48d42a661665d2c851" args="(void)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual int CBackend::AcceptAllPlusArgs </td> <td>(</td> <td class="paramtype">void </td> <td class="paramname"></td> <td> ) </td> <td><code> [inline, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Override this method if the plugin accepts arbitrary plusargs: ie +argName[=argValue] or +argName[+argValue]. </p> <dl class="return"><dt><b>Returns:</b></dt><dd>true if all plus args are allowed. Default method disallows plusargs. </dd></dl> </div> </div> <a class="anchor" id="a5fb7f8ac17c408e80eb7221d99fa4bdd"></a><!-- doxytag: member="CBackend::Activate" ref="a5fb7f8ac17c408e80eb7221d99fa4bdd" args="()=0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void CBackend::Activate </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td><code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Method to initialize the plugin. </p> <p>This method will be called once before tool is invoked. </p> </div> </div> <a class="anchor" id="a20f866dfe69bd1d73ba4f919dd5e7290"></a><!-- doxytag: member="CBackend::GetSwitchDescription" ref="a20f866dfe69bd1d73ba4f919dd5e7290" args="(const char *sw)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual const char* CBackend::GetSwitchDescription </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>sw</em></td> <td> ) </td> <td><code> [inline, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Method to get the help text for a switch using the switch name as a key. </p> <p>Generally this method need not be overriden. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>sw</em> </td><td>pointer to switch. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>description of switch. </dd></dl> </div> </div> <a class="anchor" id="a8cac4846905cfecbbd5a87af8030923b"></a><!-- doxytag: member="CBackend::GetSwitches" ref="a8cac4846905cfecbbd5a87af8030923b" args="(void)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual list<string>& CBackend::GetSwitches </td> <td>(</td> <td class="paramtype">void </td> <td class="paramname"></td> <td> ) </td> <td><code> [inline, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Access method for list of switches. </p> <p>Generally this method need not be overridden. </p> <dl class="return"><dt><b>Returns:</b></dt><dd>list of switches. </dd></dl> </div> </div> <a class="anchor" id="a157dec831229604dc32a64a7332959b2"></a><!-- doxytag: member="CBackend::GetToolDescription" ref="a157dec831229604dc32a64a7332959b2" args="(void)=0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual char* CBackend::GetToolDescription </td> <td>(</td> <td class="paramtype">void </td> <td class="paramname"></td> <td> ) </td> <td><code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Access method for tool description use in vrq help. </p> <dl class="return"><dt><b>Returns:</b></dt><dd>pointer containing the description of tool </dd></dl> </div> </div> <a class="anchor" id="a0de276c9fc23c4abe52c7407c8aee8ab"></a><!-- doxytag: member="CBackend::GetToolName" ref="a0de276c9fc23c4abe52c7407c8aee8ab" args="(void)=0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual char* CBackend::GetToolName </td> <td>(</td> <td class="paramtype">void </td> <td class="paramname"></td> <td> ) </td> <td><code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>map of switch to its description </p> <p>Access method for tool name </p> <dl class="return"><dt><b>Returns:</b></dt><dd>pointer containing the name of the tool </dd></dl> </div> </div> <a class="anchor" id="a093309b720b69958c993de14eb040803"></a><!-- doxytag: member="CBackend::HideTool" ref="a093309b720b69958c993de14eb040803" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual int CBackend::HideTool </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td><code> [inline, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>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. </p> <p>This is useful for development of plugins that care currently unstable. Note: the default behavior is to make the plugin visible. </p> <dl class="return"><dt><b>Returns:</b></dt><dd>TRUE if plugin should be hidden. </dd></dl> </div> </div> <a class="anchor" id="afade5208bdd60c6f381244d3a65fd44f"></a><!-- doxytag: member="CBackend::IgnoreVrqComments" ref="afade5208bdd60c6f381244d3a65fd44f" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual int CBackend::IgnoreVrqComments </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td><code> [inline, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>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. </p> <dl class="return"><dt><b>Returns:</b></dt><dd>TRUE if vrq translate on/off comments should be treated like normal comments. If FALSE code bracketed by // vrq translate_off and //vrq translate_on will handled as if it is a comment. </dd></dl> </div> </div> <a class="anchor" id="a2562e4cfcc84c34f01db9372cbf86d6f"></a><!-- doxytag: member="CBackend::Process" ref="a2562e4cfcc84c34f01db9372cbf86d6f" args="(list< CElement > &inputList, list< CElement > &outputList)=0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void CBackend::Process </td> <td>(</td> <td class="paramtype">list< <a class="el" href="classCElement.html">CElement</a> > & </td> <td class="paramname"> <em>inputList</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">list< <a class="el" href="classCElement.html">CElement</a> > & </td> <td class="paramname"> <em>outputList</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Method to implement plugin function. </p> <p>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 <a class="el" href="classCBackendException.html" title="Base class for exceptions that can be thrown by backend plugins.">CBackendException</a>. Note throwing an exeception and exiting normally is equivilent to throwing a <a class="el" href="classCBackendExit.html" title="Exception thrown by CBackend::Process when plugin terminates early without an error.">CBackendExit</a>. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>inputList</em> </td><td>a list of compilation units to process. </td></tr> <tr><td valign="top"></td><td valign="top"><em>outputList</em> </td><td>a list of compilation units processed. </td></tr> </table> </dd> </dl> </div> </div> <a class="anchor" id="ad24fdef8ec7199099f594d45b8ff1738"></a><!-- doxytag: member="CBackend::RegisterSwitch" ref="ad24fdef8ec7199099f594d45b8ff1738" args="(const char *switchName, const char *description)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void CBackend::RegisterSwitch </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>switchName</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>description</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [inline, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Method shortcut to register tool switches with vrq's help system. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>switchName</em> </td><td>switch string </td></tr> <tr><td valign="top"></td><td valign="top"><em>description</em> </td><td>switch description used for help text. </td></tr> </table> </dd> </dl> </div> </div> <a class="anchor" id="af3dede7025f3d6647a93529242e06709"></a><!-- doxytag: member="CBackend::RequireModuleResolution" ref="af3dede7025f3d6647a93529242e06709" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual int CBackend::RequireModuleResolution </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td><code> [inline, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Method to control if plugin requires all module definitions to be resolved. </p> <p>returns true if tool requires all module definitions to be resolved. </p> </div> </div> <a class="anchor" id="af82919cc5d2da30361078cc13bf71ec9"></a><!-- doxytag: member="CBackend::ResolveInstance" ref="af82919cc5d2da30361078cc13bf71ec9" args="(CModule *module, CInstance *inst)=0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual int CBackend::ResolveInstance </td> <td>(</td> <td class="paramtype"><a class="el" href="classCModule.html">CModule</a> * </td> <td class="paramname"> <em>module</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCInstance.html">CInstance</a> * </td> <td class="paramname"> <em>inst</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Method to control the resolution of individual module instances. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>module</em> </td><td>to the module that contains the instance. </td></tr> <tr><td valign="top"></td><td valign="top"><em>inst</em> </td><td>pointer to the instance to be resolved. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>true if the instance should be resolved prior to tool running. </dd></dl> </div> </div> <a class="anchor" id="a3b5802632eccaab19f8c9b691de06b84"></a><!-- doxytag: member="CBackend::ResolveModules" ref="a3b5802632eccaab19f8c9b691de06b84" args="()=0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual int CBackend::ResolveModules </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td><code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Method to control if plugin enables all module definitions to be searched for returns true if tool enables module definitions to be resolved. </p> </div> </div> <hr/><h2>Member Data Documentation</h2> <a class="anchor" id="ad72312994d56d43bdf34cf2ef63fab98"></a><!-- doxytag: member="CBackend::switchDescription" ref="ad72312994d56d43bdf34cf2ef63fab98" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">map<string,string> <a class="el" href="classCBackend.html#ad72312994d56d43bdf34cf2ef63fab98">CBackend::switchDescription</a><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>list of plugin command line switches </p> </div> </div> <a class="anchor" id="a8b744fe29b1fb0a6bc4645238652c90c"></a><!-- doxytag: member="CBackend::switches" ref="a8b744fe29b1fb0a6bc4645238652c90c" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">list<string> <a class="el" href="classCBackend.html#a8b744fe29b1fb0a6bc4645238652c90c">CBackend::switches</a><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li>/net/fileserver/nas/home/mdh/vrq/src/<a class="el" href="cbackend_8h_source.html">cbackend.h</a></li> </ul> </div> <hr class="footer"/><address class="footer"><small>Generated by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address> </body> </html>