<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>MarkupFilterMgr class Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.2.15 --> <center> <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> </center> <hr><h1>MarkupFilterMgr Class Reference</h1>This class is like a normal SWEncodingMgr, but you can additonally specify which markup you want to use. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="markupfiltmgr_8h-source.html">markupfiltmgr.h</a>></code> <p> Inheritance diagram for MarkupFilterMgr:<p><center><img src="class_markup_filter_mgr__inherit__graph.png" border="0" usemap="#_markup_filter_mgr__inherit__map" alt="Inheritance graph"></center> <map name="_markup_filter_mgr__inherit__map"> <area href="class_encoding_filter_mgr.html" shape="rect" coords="14,15,131,34" alt=""> </map> <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for MarkupFilterMgr:<p><center><img src="class_markup_filter_mgr__coll__graph.png" border="0" usemap="#_markup_filter_mgr__coll__map" alt="Collaboration graph"></center> <map name="_markup_filter_mgr__coll__map"> <area href="class_encoding_filter_mgr.html" shape="rect" coords="14,15,131,34" alt=""> </map> <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="class_markup_filter_mgr-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0> <tr><td colspan=2><br><h2>Public Methods</h2></td></tr> <tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="class_markup_filter_mgr.html#a0">MarkupFilterMgr</a> (char markup=FMT_THML, char encoding=ENC_UTF8)</td></tr> <tr><td> </td><td><font size=-1><em>Constructor of SWMarkupMgr.</em> <a href="#a0">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top><a name="a1" doxytag="MarkupFilterMgr::~MarkupFilterMgr"></a> </td><td valign=bottom><a class="el" href="class_markup_filter_mgr.html#a1">~MarkupFilterMgr</a> ()</td></tr> <tr><td> </td><td><font size=-1><em>The destructor of SWMarkupMgr.</em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>char </td><td valign=bottom><a class="el" href="class_markup_filter_mgr.html#a2">Markup</a> (char m=FMT_UNKNOWN)</td></tr> <tr><td> </td><td><font size=-1><em>Markup sets/gets the markup after initialization.</em> <a href="#a2">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>virtual void </td><td valign=bottom><a class="el" href="class_markup_filter_mgr.html#a3">AddRenderFilters</a> (<a class="el" href="class_s_w_module.html">SWModule</a> *module, ConfigEntMap &section)</td></tr> <tr><td> </td><td><font size=-1><em>Adds the render filters which are defined in "section" to the <a class="el" href="class_s_w_module.html">SWModule</a> object "module".</em> <a href="#a3">More...</a><em></em></font><br><br></td></tr> <tr><td colspan=2><br><h2>Protected Methods</h2></td></tr> <tr><td nowrap align=right valign=top><a name="b0" doxytag="MarkupFilterMgr::CreateFilters"></a> void </td><td valign=bottom><b>CreateFilters</b> (char markup)</td></tr> <tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr> <tr><td nowrap align=right valign=top><a name="n0" doxytag="MarkupFilterMgr::fromthml"></a> SWFilter * </td><td valign=bottom><b>fromthml</b></td></tr> <tr><td nowrap align=right valign=top><a name="n1" doxytag="MarkupFilterMgr::fromgbf"></a> SWFilter * </td><td valign=bottom><b>fromgbf</b></td></tr> <tr><td nowrap align=right valign=top><a name="n2" doxytag="MarkupFilterMgr::fromplain"></a> SWFilter * </td><td valign=bottom><b>fromplain</b></td></tr> <tr><td nowrap align=right valign=top><a name="n3" doxytag="MarkupFilterMgr::fromosis"></a> SWFilter * </td><td valign=bottom><b>fromosis</b></td></tr> <tr><td nowrap align=right valign=top><a name="n4" doxytag="MarkupFilterMgr::markup"></a> char </td><td valign=bottom><b>markup</b></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> This class is like a normal SWEncodingMgr, but you can additonally specify which markup you want to use. <p> <p> Definition at line <a class="el" href="markupfiltmgr_8h-source.html#l00031">31</a> of file <a class="el" href="markupfiltmgr_8h-source.html">markupfiltmgr.h</a>.<hr><h2>Constructor & Destructor Documentation</h2> <a name="a0" doxytag="MarkupFilterMgr::MarkupFilterMgr"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> MarkupFilterMgr::MarkupFilterMgr </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">char </td> <td class="mdname" nowrap> <em>markup</em> = FMT_THML, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>char </td> <td class="mdname" nowrap> <em>encoding</em> = ENC_UTF8</td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Constructor of SWMarkupMgr. <p> <dl compact><dt><b> Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>iconfig</em> </td><td> </td></tr> <tr><td valign=top><em>isysconfig</em> </td><td> </td></tr> <tr><td valign=top><em>autoload</em> </td><td> If this bool is true the constructor starts loading the installed modules. If you reimplemented <a class="el" href="class_s_w_mgr.html">SWMgr</a> you can set autoload=false to load the modules with your own reimplemented function. </td></tr> <tr><td valign=top><em>encoding</em> </td><td> The desired encoding. </td></tr> <tr><td valign=top><em>markup</em> </td><td> The desired markup format. </td></tr> </table> </dl> <p> Definition at line <a class="el" href="markupfiltmgr_8cpp-source.html#l00049">49</a> of file <a class="el" href="markupfiltmgr_8cpp-source.html">markupfiltmgr.cpp</a>. <p> <div class="fragment"><pre>00050 : <a class="code" href="class_encoding_filter_mgr.html#a0">EncodingFilterMgr</a>(enc) { 00051 00052 markup = mark; 00053 00054 CreateFilters(markup); 00055 } </pre></div> </td> </tr> </table> <hr><h2>Member Function Documentation</h2> <a name="a3" doxytag="MarkupFilterMgr::AddRenderFilters"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void MarkupFilterMgr::AddRenderFilters </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="class_s_w_module.html">SWModule</a> * </td> <td class="mdname" nowrap> <em>module</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>ConfigEntMap & </td> <td class="mdname" nowrap> <em>section</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"><code> [virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Adds the render filters which are defined in "section" to the <a class="el" href="class_s_w_module.html">SWModule</a> object "module". <p> <dl compact><dt><b> Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>module</em> </td><td> To this module the render filter(s) are added </td></tr> <tr><td valign=top><em>section</em> </td><td> We use this section to get a list of filters we should apply to the module </td></tr> </table> </dl> <p> Definition at line <a class="el" href="markupfiltmgr_8cpp-source.html#l00168">168</a> of file <a class="el" href="markupfiltmgr_8cpp-source.html">markupfiltmgr.cpp</a>. <p> References <a class="el" href="swmodule_8h-source.html#l00414">SWModule::AddRenderFilter</a>(), and <a class="el" href="swmodule_8cpp-source.html#l00206">SWModule::Markup</a>(). <p> <div class="fragment"><pre>00168 { 00169 <font class="keywordflow">switch</font> (module-><a class="code" href="class_s_w_module.html#a20">Markup</a>()) { 00170 <font class="keywordflow">case</font> FMT_THML: 00171 <font class="keywordflow">if</font> (fromthml) 00172 module-><a class="code" href="class_s_w_module.html#a41">AddRenderFilter</a>(fromthml); 00173 <font class="keywordflow">break</font>; 00174 <font class="keywordflow">case</font> FMT_GBF: 00175 <font class="keywordflow">if</font> (fromgbf) 00176 module-><a class="code" href="class_s_w_module.html#a41">AddRenderFilter</a>(fromgbf); 00177 <font class="keywordflow">break</font>; 00178 <font class="keywordflow">case</font> FMT_PLAIN: 00179 <font class="keywordflow">if</font> (fromplain) 00180 module-><a class="code" href="class_s_w_module.html#a41">AddRenderFilter</a>(fromplain); 00181 <font class="keywordflow">break</font>; 00182 <font class="keywordflow">case</font> FMT_OSIS: 00183 <font class="keywordflow">if</font> (fromosis) 00184 module-><a class="code" href="class_s_w_module.html#a41">AddRenderFilter</a>(fromosis); 00185 <font class="keywordflow">break</font>; 00186 } 00187 } </pre></div> </td> </tr> </table> <a name="a2" doxytag="MarkupFilterMgr::Markup"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> char MarkupFilterMgr::Markup </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">char </td> <td class="mdname1" valign="top" nowrap> <em>m</em> = FMT_UNKNOWN </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Markup sets/gets the markup after initialization. <p> <dl compact><dt><b> Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>m</em> </td><td> The new markup or FMT_UNKNOWN if you just want to get the current markup. </td></tr> </table> </dl><dl compact><dt><b> Returns: </b><dd> The current (possibly changed) markup format. </dl> <p> Definition at line <a class="el" href="markupfiltmgr_8cpp-source.html#l00080">80</a> of file <a class="el" href="markupfiltmgr_8cpp-source.html">markupfiltmgr.cpp</a>. <p> <div class="fragment"><pre>00080 { 00081 <font class="keywordflow">if</font> (mark && mark != markup) { 00082 markup = mark; 00083 ModMap::const_iterator module; 00084 00085 SWFilter * oldplain = fromplain; 00086 SWFilter * oldthml = fromthml; 00087 SWFilter * oldgbf = fromgbf; 00088 SWFilter * oldosis = fromosis; 00089 00090 CreateFilters(markup); 00091 00092 <font class="keywordflow">for</font> (module = getParentMgr()->Modules.begin(); module != getParentMgr()->Modules.end(); module++) 00093 <font class="keywordflow">switch</font> (module->second->Markup()) { 00094 <font class="keywordflow">case</font> FMT_THML: 00095 <font class="keywordflow">if</font> (oldthml != fromthml) { 00096 <font class="keywordflow">if</font> (oldthml) { 00097 <font class="keywordflow">if</font> (!fromthml) { 00098 module->second->RemoveRenderFilter(oldthml); 00099 } 00100 <font class="keywordflow">else</font> { 00101 module->second->ReplaceRenderFilter(oldthml, fromthml); 00102 } 00103 } 00104 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (fromthml) { 00105 module->second->AddRenderFilter(fromthml); 00106 } 00107 } 00108 <font class="keywordflow">break</font>; 00109 <font class="keywordflow">case</font> FMT_GBF: 00110 <font class="keywordflow">if</font> (oldgbf != fromgbf) { 00111 <font class="keywordflow">if</font> (oldgbf) { 00112 <font class="keywordflow">if</font> (!fromgbf) { 00113 module->second->RemoveRenderFilter(oldgbf); 00114 } 00115 <font class="keywordflow">else</font> { 00116 module->second->ReplaceRenderFilter(oldgbf, fromgbf); 00117 } 00118 } 00119 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (fromgbf) { 00120 module->second->AddRenderFilter(fromgbf); 00121 } 00122 <font class="keywordflow">break</font>; 00123 } 00124 <font class="keywordflow">case</font> FMT_PLAIN: 00125 <font class="keywordflow">if</font> (oldplain != fromplain) { 00126 <font class="keywordflow">if</font> (oldplain) { 00127 <font class="keywordflow">if</font> (!fromplain) { 00128 module->second->RemoveRenderFilter(oldplain); 00129 } 00130 <font class="keywordflow">else</font> { 00131 module->second->ReplaceRenderFilter(oldplain, fromplain); 00132 } 00133 } 00134 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (fromplain) { 00135 module->second->AddRenderFilter(fromplain); 00136 } 00137 <font class="keywordflow">break</font>; 00138 } 00139 <font class="keywordflow">case</font> FMT_OSIS: 00140 <font class="keywordflow">if</font> (oldosis != fromosis) { 00141 <font class="keywordflow">if</font> (oldosis) { 00142 <font class="keywordflow">if</font> (!fromosis) { 00143 module->second->RemoveRenderFilter(oldosis); 00144 } 00145 <font class="keywordflow">else</font> { 00146 module->second->ReplaceRenderFilter(oldosis, fromosis); 00147 } 00148 } 00149 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (fromosis) { 00150 module->second->AddRenderFilter(fromosis); 00151 } 00152 <font class="keywordflow">break</font>; 00153 } 00154 } 00155 00156 <font class="keywordflow">if</font> (oldthml) 00157 <font class="keyword">delete</font> oldthml; 00158 <font class="keywordflow">if</font> (oldgbf) 00159 <font class="keyword">delete</font> oldgbf; 00160 <font class="keywordflow">if</font> (oldplain) 00161 <font class="keyword">delete</font> oldplain; 00162 <font class="keywordflow">if</font> (oldosis) 00163 <font class="keyword">delete</font> oldosis; 00164 } 00165 <font class="keywordflow">return</font> markup; 00166 } </pre></div> </td> </tr> </table> <hr>The documentation for this class was generated from the following files:<ul> <li><a class="el" href="markupfiltmgr_8h-source.html">markupfiltmgr.h</a><li><a class="el" href="markupfiltmgr_8cpp-source.html">markupfiltmgr.cpp</a></ul> <hr><address align="right"><small>Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.15 </small></address> </body> </html>