<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en"> <!-- Scopes/Synopsis/Formatters/HTML/Fragment/Fragment.html --> <!-- this view was generated by Scope --> <head> <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type"/> <title >Synopsis - Synopsis.Formatters.HTML.Fragment.Fragment</title> <link href="../../../../../style.css" type="text/css" rel="stylesheet" /> </head> <body class="Scope"> <div class="navigation"> <span class="normal"><a href="../../../../Synopsis.html" >Global Package</a></span> <span class="normal"><a href="../../../../../InheritanceTree.html" >Inheritance Tree</a></span> <span class="normal"><a href="../../../../../InheritanceGraph.html" >Inheritance Graph</a></span> <span class="normal"><a href="../../../../../NameIndex.html" >Name Index</a></span> </div> <!-- this part was generated by Heading --> <div class="class-module">module <a href="../../../../Synopsis.html" >Synopsis</a>.<a href="../../../Formatters.html" >Formatters</a>.<a href="../../HTML.html" >HTML</a>.<a href="../Fragment.html" >Fragment</a> </div><div class="class-name">class Fragment </div><div class="links"><div class="file">File: <a href="../../../../../File/Synopsis/Formatters/HTML/Fragment.py.html" target="detail">../Synopsis/Formatters/HTML/Fragment.py</a></div> <div class="xref"><a href="../../../../../XRef/xref9.html#Synopsis.Formatters.HTML.Fragment.Fragment" ><img src="../../../../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../../../../Source/Synopsis/Formatters/HTML/Fragment.py.html#line11" ><img src="../../../../../src-py.png" alt="source code"/></a></div></div> <img alt="Fragment-inheritance" src="Fragment-inheritance.png" hspace="8" vspace="8" border="0" usemap="#Fragment-inheritance_map" /> <map name="Fragment-inheritance_map"></map> <div class="doc">Generates HTML fragment for a declaration. Multiple strategies are combined to generate the output for a single declaration, allowing the user to customise the output by choosing a set of strategies. This follows the Strategy design pattern. The key concept of this class is the format* methods. Any class derived from Strategy that overrides one of the format methods will have that method called by the Summary and Detail formatters when they visit that ASG type. Summary and Detail maintain a list of Strategies, and a list for each ASG type. For example, when Strategy.Summary visits a Function object, it calls the formatFunction method on all Strategys registed with SummaryFormatter that implemented that method. Each of these format methods returns a string, which may contain a TD tag to create a new column. An important point to note is that only Strategies which override a particular format method are called - if that format method is not overridden then it is not called for that declaration type. </div> <!-- this part was generated by Summary --> <div class="summary"> <div class="heading">Methods Summary:</div> <div class="item"><div class="synopsis">  <span class="name"><a href="Fragment.html#register" >register</a></span>(<span class="variable">self</span>, <span class="variable">formatter</span>) </div> <div class="xref"><a href="../../../../../XRef/xref10.html#Synopsis.Formatters.HTML.Fragment.Fragment.register" ><img src="../../../../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../../../../Source/Synopsis/Formatters/HTML/Fragment.py.html#line34" ><img src="../../../../../src-py.png" alt="source code"/></a></div> <div class="doc">Store formatter as self.formatter.</div></div> <div class="item"><div class="synopsis">  <span class="name"><a href="Fragment.html#format_modifiers" >format_modifiers</a></span>(<span class="variable">self</span>, <span class="variable">modifiers</span>) </div> <div class="xref"><a href="../../../../../XRef/xref10.html#Synopsis.Formatters.HTML.Fragment.Fragment.format_modifiers" ><img src="../../../../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../../../../Source/Synopsis/Formatters/HTML/Fragment.py.html#line52" ><img src="../../../../../src-py.png" alt="source code"/></a></div> <div class="doc">Returns a HTML string from the given list of string modifiers.</div></div> <div class="item"><div class="synopsis">  <a class="name" id="format_declaration">format_declaration</a>(<span class="variable">self</span>, <span class="variable">decl</span>) </div> <div class="xref"><a href="../../../../../XRef/xref9.html#Synopsis.Formatters.HTML.Fragment.Fragment.format_declaration" ><img src="../../../../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../../../../Source/Synopsis/Formatters/HTML/Fragment.py.html#line65" ><img src="../../../../../src-py.png" alt="source code"/></a></div> <div class="doc"></div></div> <div class="item"><div class="synopsis">  <a class="name" id="format_macro">format_macro</a>(<span class="variable">self</span>, <span class="variable">decl</span>) </div> <div class="xref"><a href="../../../../../XRef/xref10.html#Synopsis.Formatters.HTML.Fragment.Fragment.format_macro" ><img src="../../../../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../../../../Source/Synopsis/Formatters/HTML/Fragment.py.html#line66" ><img src="../../../../../src-py.png" alt="source code"/></a></div> <div class="doc"></div></div> <div class="item"><div class="synopsis">  <a class="name" id="format_forward">format_forward</a>(<span class="variable">self</span>, <span class="variable">decl</span>) </div> <div class="xref"><a href="../../../../../XRef/xref9.html#Synopsis.Formatters.HTML.Fragment.Fragment.format_forward" ><img src="../../../../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../../../../Source/Synopsis/Formatters/HTML/Fragment.py.html#line67" ><img src="../../../../../src-py.png" alt="source code"/></a></div> <div class="doc"></div></div> <div class="item"><div class="synopsis">  <a class="name" id="format_group">format_group</a>(<span class="variable">self</span>, <span class="variable">decl</span>) </div> <div class="xref"><a href="../../../../../XRef/xref10.html#Synopsis.Formatters.HTML.Fragment.Fragment.format_group" ><img src="../../../../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../../../../Source/Synopsis/Formatters/HTML/Fragment.py.html#line68" ><img src="../../../../../src-py.png" alt="source code"/></a></div> <div class="doc"></div></div> <div class="item"><div class="synopsis">  <a class="name" id="format_scope">format_scope</a>(<span class="variable">self</span>, <span class="variable">decl</span>) </div> <div class="xref"><a href="../../../../../XRef/xref10.html#Synopsis.Formatters.HTML.Fragment.Fragment.format_scope" ><img src="../../../../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../../../../Source/Synopsis/Formatters/HTML/Fragment.py.html#line69" ><img src="../../../../../src-py.png" alt="source code"/></a></div> <div class="doc"></div></div> <div class="item"><div class="synopsis">  <a class="name" id="format_module">format_module</a>(<span class="variable">self</span>, <span class="variable">decl</span>) </div> <div class="xref"><a href="../../../../../XRef/xref10.html#Synopsis.Formatters.HTML.Fragment.Fragment.format_module" ><img src="../../../../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../../../../Source/Synopsis/Formatters/HTML/Fragment.py.html#line70" ><img src="../../../../../src-py.png" alt="source code"/></a></div> <div class="doc"></div></div> <div class="item"><div class="synopsis">  <a class="name" id="format_meta_module">format_meta_module</a>(<span class="variable">self</span>, <span class="variable">decl</span>) </div> <div class="xref"><a href="../../../../../XRef/xref10.html#Synopsis.Formatters.HTML.Fragment.Fragment.format_meta_module" ><img src="../../../../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../../../../Source/Synopsis/Formatters/HTML/Fragment.py.html#line71" ><img src="../../../../../src-py.png" alt="source code"/></a></div> <div class="doc"></div></div> <div class="item"><div class="synopsis">  <a class="name" id="format_class">format_class</a>(<span class="variable">self</span>, <span class="variable">decl</span>) </div> <div class="xref"><a href="../../../../../XRef/xref9.html#Synopsis.Formatters.HTML.Fragment.Fragment.format_class" ><img src="../../../../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../../../../Source/Synopsis/Formatters/HTML/Fragment.py.html#line72" ><img src="../../../../../src-py.png" alt="source code"/></a></div> <div class="doc"></div></div> <div class="item"><div class="synopsis">  <a class="name" id="format_class_template">format_class_template</a>(<span class="variable">self</span>, <span class="variable">decl</span>) </div> <div class="xref"><a href="../../../../../XRef/xref9.html#Synopsis.Formatters.HTML.Fragment.Fragment.format_class_template" ><img src="../../../../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../../../../Source/Synopsis/Formatters/HTML/Fragment.py.html#line73" ><img src="../../../../../src-py.png" alt="source code"/></a></div> <div class="doc"></div></div> <div class="item"><div class="synopsis">  <a class="name" id="format_typedef">format_typedef</a>(<span class="variable">self</span>, <span class="variable">decl</span>) </div> <div class="xref"><a href="../../../../../XRef/xref10.html#Synopsis.Formatters.HTML.Fragment.Fragment.format_typedef" ><img src="../../../../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../../../../Source/Synopsis/Formatters/HTML/Fragment.py.html#line74" ><img src="../../../../../src-py.png" alt="source code"/></a></div> <div class="doc"></div></div> <div class="item"><div class="synopsis">  <a class="name" id="format_enum">format_enum</a>(<span class="variable">self</span>, <span class="variable">decl</span>) </div> <div class="xref"><a href="../../../../../XRef/xref9.html#Synopsis.Formatters.HTML.Fragment.Fragment.format_enum" ><img src="../../../../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../../../../Source/Synopsis/Formatters/HTML/Fragment.py.html#line75" ><img src="../../../../../src-py.png" alt="source code"/></a></div> <div class="doc"></div></div> <div class="item"><div class="synopsis">  <a class="name" id="format_variable">format_variable</a>(<span class="variable">self</span>, <span class="variable">decl</span>) </div> <div class="xref"><a href="../../../../../XRef/xref10.html#Synopsis.Formatters.HTML.Fragment.Fragment.format_variable" ><img src="../../../../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../../../../Source/Synopsis/Formatters/HTML/Fragment.py.html#line76" ><img src="../../../../../src-py.png" alt="source code"/></a></div> <div class="doc"></div></div> <div class="item"><div class="synopsis">  <a class="name" id="format_const">format_const</a>(<span class="variable">self</span>, <span class="variable">decl</span>) </div> <div class="xref"><a href="../../../../../XRef/xref9.html#Synopsis.Formatters.HTML.Fragment.Fragment.format_const" ><img src="../../../../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../../../../Source/Synopsis/Formatters/HTML/Fragment.py.html#line77" ><img src="../../../../../src-py.png" alt="source code"/></a></div> <div class="doc"></div></div> <div class="item"><div class="synopsis">  <a class="name" id="format_function">format_function</a>(<span class="variable">self</span>, <span class="variable">decl</span>) </div> <div class="xref"><a href="../../../../../XRef/xref9.html#Synopsis.Formatters.HTML.Fragment.Fragment.format_function" ><img src="../../../../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../../../../Source/Synopsis/Formatters/HTML/Fragment.py.html#line78" ><img src="../../../../../src-py.png" alt="source code"/></a></div> <div class="doc"></div></div> <div class="item"><div class="synopsis">  <a class="name" id="format_function_template">format_function_template</a>(<span class="variable">self</span>, <span class="variable">decl</span>) </div> <div class="xref"><a href="../../../../../XRef/xref10.html#Synopsis.Formatters.HTML.Fragment.Fragment.format_function_template" ><img src="../../../../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../../../../Source/Synopsis/Formatters/HTML/Fragment.py.html#line79" ><img src="../../../../../src-py.png" alt="source code"/></a></div> <div class="doc"></div></div> <div class="item"><div class="synopsis">  <a class="name" id="format_operation">format_operation</a>(<span class="variable">self</span>, <span class="variable">decl</span>) </div> <div class="xref"><a href="../../../../../XRef/xref10.html#Synopsis.Formatters.HTML.Fragment.Fragment.format_operation" ><img src="../../../../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../../../../Source/Synopsis/Formatters/HTML/Fragment.py.html#line80" ><img src="../../../../../src-py.png" alt="source code"/></a></div> <div class="doc"></div></div> <div class="item"><div class="synopsis">  <a class="name" id="format_operation_template">format_operation_template</a>(<span class="variable">self</span>, <span class="variable">decl</span>) </div> <div class="xref"><a href="../../../../../XRef/xref10.html#Synopsis.Formatters.HTML.Fragment.Fragment.format_operation_template" ><img src="../../../../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../../../../Source/Synopsis/Formatters/HTML/Fragment.py.html#line81" ><img src="../../../../../src-py.png" alt="source code"/></a></div> <div class="doc"></div></div> </div><!-- summary --> <!-- this part was generated by Inheritance --> <!-- this part was generated by Detail --> <div class="detail"> <div class="heading">Methods Details:</div> <div class="item"><div class="synopsis">  <a class="name" id="register">register</a>(<span class="variable">self</span>, <span class="variable">formatter</span>) </div> <div class="xref"><a href="../../../../../XRef/xref10.html#Synopsis.Formatters.HTML.Fragment.Fragment.register" ><img src="../../../../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../../../../Source/Synopsis/Formatters/HTML/Fragment.py.html#line34" ><img src="../../../../../src-py.png" alt="source code"/></a></div> <div class="doc">Store formatter as self.formatter. The formatter is either a SummaryFormatter or DetailFormatter, and is used for things like reference() and label() calls. Local references to the formatter's reference and label methods are stored in self for more efficient use of them.</div></div> <div class="item"><div class="synopsis">  <a class="name" id="format_modifiers">format_modifiers</a>(<span class="variable">self</span>, <span class="variable">modifiers</span>) </div> <div class="xref"><a href="../../../../../XRef/xref10.html#Synopsis.Formatters.HTML.Fragment.Fragment.format_modifiers" ><img src="../../../../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../../../../Source/Synopsis/Formatters/HTML/Fragment.py.html#line52" ><img src="../../../../../src-py.png" alt="source code"/></a></div> <div class="doc">Returns a HTML string from the given list of string modifiers. The modifiers are enclosed in 'keyword' spans.</div></div> </div><!-- detail --> <div class="logo">Generated on Thu Apr 16 16:27:01 2009 by <br/> <a href="http://synopsis.fresco.org" target="_blank"><img src="../../../../../synopsis.png" alt="logo"/> synopsis</a> (version devel)</div> </body> </html>