doc/api/python/ats3.parsers.CppParser-class.html
changeset 436 9dcc6e7393f7
parent 432 f2ddfa555b0f
equal deleted inserted replaced
435:9374c207cfee 436:9dcc6e7393f7
       
     1 <?xml version="1.0" encoding="ascii"?>
       
     2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       
     3           "DTD/xhtml1-transitional.dtd">
       
     4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
       
     5 <head>
       
     6   <title>ats3.parsers.CppParser</title>
       
     7   <link rel="stylesheet" href="epydoc.css" type="text/css" />
       
     8   <script type="text/javascript" src="epydoc.js"></script>
       
     9 </head>
       
    10 
       
    11 <body bgcolor="white" text="black" link="blue" vlink="#204080"
       
    12       alink="#204080">
       
    13 <!-- ==================== NAVIGATION BAR ==================== -->
       
    14 <table class="navbar" border="0" width="100%" cellpadding="0"
       
    15        bgcolor="#a0c0ff" cellspacing="0">
       
    16   <tr valign="middle">
       
    17 
       
    18   <!-- Tree link -->
       
    19       <th>&nbsp;&nbsp;&nbsp;<a
       
    20         href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
       
    21 
       
    22   <!-- Index link -->
       
    23       <th>&nbsp;&nbsp;&nbsp;<a
       
    24         href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
       
    25 
       
    26   <!-- Help link -->
       
    27       <th>&nbsp;&nbsp;&nbsp;<a
       
    28         href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
       
    29 
       
    30       <th class="navbar" width="100%"></th>
       
    31   </tr>
       
    32 </table>
       
    33 <table width="100%" cellpadding="0" cellspacing="0">
       
    34   <tr valign="top">
       
    35     <td width="100%">
       
    36       <span class="breadcrumbs">
       
    37         <a href="ats3-module.html">Package&nbsp;ats3</a> ::
       
    38         <a href="ats3.parsers-module.html">Module&nbsp;parsers</a> ::
       
    39         Class&nbsp;CppParser
       
    40       </span>
       
    41     </td>
       
    42     <td>
       
    43       <table cellpadding="0" cellspacing="0">
       
    44         <!-- hide/show private -->
       
    45         <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
       
    46     onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
       
    47         <tr><td align="right"><span class="options"
       
    48             >[<a href="frames.html" target="_top">frames</a
       
    49             >]&nbsp;|&nbsp;<a href="ats3.parsers.CppParser-class.html"
       
    50             target="_top">no&nbsp;frames</a>]</span></td></tr>
       
    51       </table>
       
    52     </td>
       
    53   </tr>
       
    54 </table>
       
    55 <!-- ==================== CLASS DESCRIPTION ==================== -->
       
    56 <h1 class="epydoc">Class CppParser</h1><span class="codelink"><a href="ats3.parsers-pysrc.html#CppParser">source&nbsp;code</a></span><br /><br />
       
    57 <pre class="base-tree">
       
    58 object --+
       
    59          |
       
    60         <strong class="uidshort">CppParser</strong>
       
    61 </pre>
       
    62 
       
    63 <hr />
       
    64 Parser for CPP tool output. Returns cleaned output from the execution
       
    65 of CPP with or without parent paths included in the output.<br /><br />
       
    66 
       
    67 <!-- ==================== INSTANCE METHODS ==================== -->
       
    68 <a name="section-InstanceMethods"></a>
       
    69 <table class="summary" border="1" cellpadding="3"
       
    70        cellspacing="0" width="100%" bgcolor="white">
       
    71 <tr bgcolor="#70b0f0" class="table-header">
       
    72   <td colspan="2" class="table-header">
       
    73     <table border="0" cellpadding="0" cellspacing="0" width="100%">
       
    74       <tr valign="top">
       
    75         <td align="left"><span class="table-header">Instance Methods</span></td>
       
    76         <td align="right" valign="top"
       
    77          ><span class="options">[<a href="#section-InstanceMethods"
       
    78          class="privatelink" onclick="toggle_private();"
       
    79          >hide private</a>]</span></td>
       
    80       </tr>
       
    81     </table>
       
    82   </td>
       
    83 </tr>
       
    84 <tr>
       
    85     <td width="15%" align="right" valign="top" class="summary">
       
    86       <span class="summary-type">&nbsp;</span>
       
    87     </td><td class="summary">
       
    88       <table width="100%" cellpadding="0" cellspacing="0" border="0">
       
    89         <tr>
       
    90           <td><span class="summary-sig"><a href="ats3.parsers.CppParser-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>)</span><br />
       
    91       x.__init__(...) initializes x; see x.__class__.__doc__ for signature</td>
       
    92           <td align="right" valign="top">
       
    93             <span class="codelink"><a href="ats3.parsers-pysrc.html#CppParser.__init__">source&nbsp;code</a></span>
       
    94             
       
    95           </td>
       
    96         </tr>
       
    97       </table>
       
    98       
       
    99     </td>
       
   100   </tr>
       
   101 <tr>
       
   102     <td width="15%" align="right" valign="top" class="summary">
       
   103       <span class="summary-type">&nbsp;</span>
       
   104     </td><td class="summary">
       
   105       <table width="100%" cellpadding="0" cellspacing="0" border="0">
       
   106         <tr>
       
   107           <td><span class="summary-sig"><a href="ats3.parsers.CppParser-class.html#get_cpp_output" class="summary-sig-name">get_cpp_output</a>(<span class="summary-sig-arg">self</span>,
       
   108         <span class="summary-sig-arg">bld_path</span>=<span class="summary-sig-default">None</span>,
       
   109         <span class="summary-sig-arg">output_parameter</span>=<span class="summary-sig-default">&quot;n&quot;</span>,
       
   110         <span class="summary-sig-arg">imacros</span>=<span class="summary-sig-default">None</span>)</span><br />
       
   111       To clean out conditionals from the compilation it is necessary to 
       
   112 use C preprocessing to clean out those.</td>
       
   113           <td align="right" valign="top">
       
   114             <span class="codelink"><a href="ats3.parsers-pysrc.html#CppParser.get_cpp_output">source&nbsp;code</a></span>
       
   115             
       
   116           </td>
       
   117         </tr>
       
   118       </table>
       
   119       
       
   120     </td>
       
   121   </tr>
       
   122 <tr>
       
   123     <td width="15%" align="right" valign="top" class="summary">
       
   124       <span class="summary-type">&nbsp;</span>
       
   125     </td><td class="summary">
       
   126       <table width="100%" cellpadding="0" cellspacing="0" border="0">
       
   127         <tr>
       
   128           <td><span class="summary-sig"><a name="create_dependency_dictionary"></a><span class="summary-sig-name">create_dependency_dictionary</span>(<span class="summary-sig-arg">self</span>,
       
   129         <span class="summary-sig-arg">_pipe_</span>,
       
   130         <span class="summary-sig-arg">path_to_bld</span>)</span><br />
       
   131       The output from CPP is cleaned in a fashion that the output is
       
   132 a dictionary (or nested dictionary) of paths and their dependencies.</td>
       
   133           <td align="right" valign="top">
       
   134             <span class="codelink"><a href="ats3.parsers-pysrc.html#CppParser.create_dependency_dictionary">source&nbsp;code</a></span>
       
   135             
       
   136           </td>
       
   137         </tr>
       
   138       </table>
       
   139       
       
   140     </td>
       
   141   </tr>
       
   142 <tr>
       
   143     <td width="15%" align="right" valign="top" class="summary">
       
   144       <span class="summary-type">&nbsp;</span>
       
   145     </td><td class="summary">
       
   146       <table width="100%" cellpadding="0" cellspacing="0" border="0">
       
   147         <tr>
       
   148           <td><span class="summary-sig"><a name="clean_cpp_output"></a><span class="summary-sig-name">clean_cpp_output</span>(<span class="summary-sig-arg">self</span>,
       
   149         <span class="summary-sig-arg">bld_path</span>,
       
   150         <span class="summary-sig-arg">path_list</span>)</span><br />
       
   151       The output from CPP needs to be &quot;cleaned&quot; so that extra chars needs
       
   152 to be removed and also hierarchy which cpp is following is preserved
       
   153 and returned as an output.</td>
       
   154           <td align="right" valign="top">
       
   155             <span class="codelink"><a href="ats3.parsers-pysrc.html#CppParser.clean_cpp_output">source&nbsp;code</a></span>
       
   156             
       
   157           </td>
       
   158         </tr>
       
   159       </table>
       
   160       
       
   161     </td>
       
   162   </tr>
       
   163   <tr>
       
   164     <td colspan="2" class="summary">
       
   165     <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
       
   166       <code>__delattr__</code>,
       
   167       <code>__getattribute__</code>,
       
   168       <code>__hash__</code>,
       
   169       <code>__new__</code>,
       
   170       <code>__reduce__</code>,
       
   171       <code>__reduce_ex__</code>,
       
   172       <code>__repr__</code>,
       
   173       <code>__setattr__</code>,
       
   174       <code>__str__</code>
       
   175       </p>
       
   176     </td>
       
   177   </tr>
       
   178 </table>
       
   179 <!-- ==================== PROPERTIES ==================== -->
       
   180 <a name="section-Properties"></a>
       
   181 <table class="summary" border="1" cellpadding="3"
       
   182        cellspacing="0" width="100%" bgcolor="white">
       
   183 <tr bgcolor="#70b0f0" class="table-header">
       
   184   <td colspan="2" class="table-header">
       
   185     <table border="0" cellpadding="0" cellspacing="0" width="100%">
       
   186       <tr valign="top">
       
   187         <td align="left"><span class="table-header">Properties</span></td>
       
   188         <td align="right" valign="top"
       
   189          ><span class="options">[<a href="#section-Properties"
       
   190          class="privatelink" onclick="toggle_private();"
       
   191          >hide private</a>]</span></td>
       
   192       </tr>
       
   193     </table>
       
   194   </td>
       
   195 </tr>
       
   196   <tr>
       
   197     <td colspan="2" class="summary">
       
   198     <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
       
   199       <code>__class__</code>
       
   200       </p>
       
   201     </td>
       
   202   </tr>
       
   203 </table>
       
   204 <!-- ==================== METHOD DETAILS ==================== -->
       
   205 <a name="section-MethodDetails"></a>
       
   206 <table class="details" border="1" cellpadding="3"
       
   207        cellspacing="0" width="100%" bgcolor="white">
       
   208 <tr bgcolor="#70b0f0" class="table-header">
       
   209   <td colspan="2" class="table-header">
       
   210     <table border="0" cellpadding="0" cellspacing="0" width="100%">
       
   211       <tr valign="top">
       
   212         <td align="left"><span class="table-header">Method Details</span></td>
       
   213         <td align="right" valign="top"
       
   214          ><span class="options">[<a href="#section-MethodDetails"
       
   215          class="privatelink" onclick="toggle_private();"
       
   216          >hide private</a>]</span></td>
       
   217       </tr>
       
   218     </table>
       
   219   </td>
       
   220 </tr>
       
   221 </table>
       
   222 <a name="__init__"></a>
       
   223 <div>
       
   224 <table class="details" border="1" cellpadding="3"
       
   225        cellspacing="0" width="100%" bgcolor="white">
       
   226 <tr><td>
       
   227   <table width="100%" cellpadding="0" cellspacing="0" border="0">
       
   228   <tr valign="top"><td>
       
   229   <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>)</span>
       
   230     <br /><em class="fname">(Constructor)</em>
       
   231   </h3>
       
   232   </td><td align="right" valign="top"
       
   233     ><span class="codelink"><a href="ats3.parsers-pysrc.html#CppParser.__init__">source&nbsp;code</a></span>&nbsp;
       
   234     </td>
       
   235   </table>
       
   236   
       
   237   x.__init__(...) initializes x; see x.__class__.__doc__ for signature
       
   238   <dl class="fields">
       
   239     <dt>Overrides:
       
   240       object.__init__
       
   241         <dd><em class="note">(inherited documentation)</em></dd>
       
   242     </dt>
       
   243   </dl>
       
   244 </td></tr></table>
       
   245 </div>
       
   246 <a name="get_cpp_output"></a>
       
   247 <div>
       
   248 <table class="details" border="1" cellpadding="3"
       
   249        cellspacing="0" width="100%" bgcolor="white">
       
   250 <tr><td>
       
   251   <table width="100%" cellpadding="0" cellspacing="0" border="0">
       
   252   <tr valign="top"><td>
       
   253   <h3 class="epydoc"><span class="sig"><span class="sig-name">get_cpp_output</span>(<span class="sig-arg">self</span>,
       
   254         <span class="sig-arg">bld_path</span>=<span class="sig-default">None</span>,
       
   255         <span class="sig-arg">output_parameter</span>=<span class="sig-default">&quot;n&quot;</span>,
       
   256         <span class="sig-arg">imacros</span>=<span class="sig-default">None</span>)</span>
       
   257   </h3>
       
   258   </td><td align="right" valign="top"
       
   259     ><span class="codelink"><a href="ats3.parsers-pysrc.html#CppParser.get_cpp_output">source&nbsp;code</a></span>&nbsp;
       
   260     </td>
       
   261   </table>
       
   262   
       
   263   <pre class="literalblock">
       
   264 
       
   265 To clean out conditionals from the compilation it is necessary to 
       
   266 use C preprocessing to clean out those.
       
   267 
       
   268 If ('n' - normal) output is chosen, parser returns list of paths
       
   269 If ('e' - extended) output is chosen parser returns list of (path, parent_path) tuples
       
   270 If ('d' - dependency) output is chosen parser returns a dicitionary (can be a nested dictionary) 
       
   271           of paths dependency (-ies). 
       
   272           
       
   273 'imacros' can also be given as parameters for CPP options.
       
   274 
       
   275 if bld file is not given, the function will try to find the file(s) on the given location with extension &quot;.inf&quot;
       
   276 
       
   277 </pre>
       
   278   <dl class="fields">
       
   279   </dl>
       
   280 </td></tr></table>
       
   281 </div>
       
   282 <br />
       
   283 <!-- ==================== NAVIGATION BAR ==================== -->
       
   284 <table class="navbar" border="0" width="100%" cellpadding="0"
       
   285        bgcolor="#a0c0ff" cellspacing="0">
       
   286   <tr valign="middle">
       
   287 
       
   288   <!-- Tree link -->
       
   289       <th>&nbsp;&nbsp;&nbsp;<a
       
   290         href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
       
   291 
       
   292   <!-- Index link -->
       
   293       <th>&nbsp;&nbsp;&nbsp;<a
       
   294         href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
       
   295 
       
   296   <!-- Help link -->
       
   297       <th>&nbsp;&nbsp;&nbsp;<a
       
   298         href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
       
   299 
       
   300       <th class="navbar" width="100%"></th>
       
   301   </tr>
       
   302 </table>
       
   303 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
       
   304   <tr>
       
   305     <td align="left" class="footer">
       
   306     Generated by Epydoc 3.0beta1 on Wed Sep 09 13:44:17 2009
       
   307     </td>
       
   308     <td align="right" class="footer">
       
   309       <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
       
   310     </td>
       
   311   </tr>
       
   312 </table>
       
   313 
       
   314 <script type="text/javascript">
       
   315   <!--
       
   316   // Private objects are initially displayed (because if
       
   317   // javascript is turned off then we want them to be
       
   318   // visible); but by default, we want to hide them.  So hide
       
   319   // them unless we have a cookie that says to show them.
       
   320   checkCookie()
       
   321   // -->
       
   322 </script>
       
   323   
       
   324 </body>
       
   325 </html>