diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-07 18:21:29 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-07 18:21:29 +0000 |
commit | 60a9969b9471dec190d5526b79cb731ea2e1b751 (patch) | |
tree | 5907a6114dba8f49c26b89a47e4c6fffd9e1fdd3 /docs/module-doc/classConfigReader.html | |
parent | f2c5ec55f306657b2eb249ae483270bc466c2cb7 (diff) |
Added new documentation
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@424 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'docs/module-doc/classConfigReader.html')
-rw-r--r-- | docs/module-doc/classConfigReader.html | 114 |
1 files changed, 76 insertions, 38 deletions
diff --git a/docs/module-doc/classConfigReader.html b/docs/module-doc/classConfigReader.html index f19df250a..1e56ef39b 100644 --- a/docs/module-doc/classConfigReader.html +++ b/docs/module-doc/classConfigReader.html @@ -35,8 +35,10 @@ Inheritance diagram for ConfigReader:<p><center><img src="classConfigReader__inh <tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classConfigReader.html#a5">Verify</a> ()</td></tr> <tr><td> </td><td><font size=-1><em>Returns true if a config file is valid.</em> <a href="#a5"></a><em></em></font><br><br></td></tr> <tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr> -<tr><td nowrap align=right valign=top>std::string </td><td valign=bottom><a class="el" href="classConfigReader.html#n0">fname</a></td></tr> -<tr><td> </td><td><font size=-1><em>The filename of the configuration file, as set by the constructor.</em> <a href="#n0"></a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>std::stringstream * </td><td valign=bottom><a class="el" href="classConfigReader.html#n0">cache</a></td></tr> +<tr><td> </td><td><font size=-1><em>The contents of the configuration file This protected member should never be accessed by a module (and cannot be accessed unless the core is changed).</em> <a href="#n0"></a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classConfigReader.html#n1">error</a></td></tr> +<tr><td> </td><td><font size=-1><em>Used to store errors.</em> <a href="#n1"></a><em></em></font><br><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> Allows reading of values from configuration files This class allows a module to read from either the main configuration file (inspircd.conf) or from a module-specified configuration file. @@ -45,7 +47,7 @@ It may either be instantiated with one parameter or none. Constructing the class <p> <p> -Definition at line <a class="el" href="modules_8h-source.html#l00448">448</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>.<hr><h2>Constructor & Destructor Documentation</h2> +Definition at line <a class="el" href="modules_8h-source.html#l00469">469</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>.<hr><h2>Constructor & Destructor Documentation</h2> <a name="a0" doxytag="ConfigReader::ConfigReader"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> @@ -75,13 +77,14 @@ Default constructor. <p> This constructor initialises the ConfigReader class to read the inspircd.conf file as specified when running ./configure. <p> -Definition at line <a class="el" href="modules_8cpp-source.html#l00296">296</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. +Definition at line <a class="el" href="modules_8cpp-source.html#l00319">319</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. <p> -References <a class="el" href="modules_8h-source.html#l00453">fname</a>. +References <a class="el" href="modules_8h-source.html#l00477">cache</a>, and <a class="el" href="modules_8h-source.html#l00480">error</a>. <p> -<div class="fragment"><pre>00297 { -00298 <a class="code" href="classConfigReader.html#n0">fname</a> = CONFIG_FILE; -00299 } +<div class="fragment"><pre>00320 { +00321 this-><a class="code" href="classConfigReader.html#n0">cache</a> = <span class="keyword">new</span> std::stringstream(stringstream::in | stringstream::out); +00322 this-><a class="code" href="classConfigReader.html#n1">error</a> = LoadConf(CONFIG_FILE,this->cache); +00323 } </pre></div> </td> </tr> </table> @@ -115,9 +118,14 @@ Overloaded constructor. <p> This constructor initialises the ConfigReader class to read a user-specified config file <p> -Definition at line <a class="el" href="modules_8cpp-source.html#l00307">307</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. +Definition at line <a class="el" href="modules_8cpp-source.html#l00333">333</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. <p> -<div class="fragment"><pre>00307 : <a class="code" href="classConfigReader.html#n0">fname</a>(filename) { }; +References <a class="el" href="modules_8h-source.html#l00477">cache</a>, and <a class="el" href="modules_8h-source.html#l00480">error</a>. +<p> +<div class="fragment"><pre>00334 { +00335 this-><a class="code" href="classConfigReader.html#n0">cache</a> = <span class="keyword">new</span> std::stringstream(stringstream::in | stringstream::out); +00336 this-><a class="code" href="classConfigReader.html#n1">error</a> = LoadConf(filename.c_str(),this-><a class="code" href="classConfigReader.html#n0">cache</a>); +00337 }; </pre></div> </td> </tr> </table> @@ -150,10 +158,14 @@ Default destructor. <p> This method destroys the ConfigReader class. <p> -Definition at line <a class="el" href="modules_8cpp-source.html#l00302">302</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. +Definition at line <a class="el" href="modules_8cpp-source.html#l00326">326</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. +<p> +References <a class="el" href="modules_8h-source.html#l00477">cache</a>. <p> -<div class="fragment"><pre>00303 { -00304 } +<div class="fragment"><pre>00327 { +00328 <span class="keywordflow">if</span> (this-><a class="code" href="classConfigReader.html#n0">cache</a>) +00329 <span class="keyword">delete</span> this-><a class="code" href="classConfigReader.html#n0">cache</a>; +00330 } </pre></div> </td> </tr> </table> @@ -188,13 +200,11 @@ Counts the number of times a given tag appears in the config file. <p> This method counts the number of times a tag appears in a config file, for use where there are several tags of the same kind, e.g. with opers and connect types. It can be used with the index value of <a class="el" href="classConfigReader.html#a3">ConfigReader::ReadValue</a> to loop through all copies of a multiple instance tag. <p> -Definition at line <a class="el" href="modules_8cpp-source.html#l00317">317</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. +Definition at line <a class="el" href="modules_8cpp-source.html#l00347">347</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. <p> -References <a class="el" href="modules_8h-source.html#l00453">fname</a>. -<p> -<div class="fragment"><pre>00318 { -00319 <span class="keywordflow">return</span> EnumConf(<a class="code" href="classConfigReader.html#n0">fname</a>.c_str(),tag.c_str()); -00320 } +<div class="fragment"><pre>00348 { +00349 <span class="keywordflow">return</span> EnumConf(cache,tag.c_str()); +00350 } </pre></div> </td> </tr> </table> @@ -243,15 +253,13 @@ Retrieves a value from the config file. <p> This method retrieves a value from the config file. Where multiple copies of the tag exist in the config file, index indicates which of the values to retrieve. <p> -Definition at line <a class="el" href="modules_8cpp-source.html#l00309">309</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. -<p> -References <a class="el" href="modules_8h-source.html#l00453">fname</a>. +Definition at line <a class="el" href="modules_8cpp-source.html#l00339">339</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. <p> -<div class="fragment"><pre>00310 { -00311 <span class="keywordtype">char</span> val[MAXBUF]; -00312 ReadConf(<a class="code" href="classConfigReader.html#n0">fname</a>.c_str(),tag.c_str(),name.c_str(),index,val); -00313 <span class="keywordflow">return</span> val; -00314 } +<div class="fragment"><pre>00340 { +00341 <span class="keywordtype">char</span> val[MAXBUF]; +00342 ReadConf(cache,tag.c_str(),name.c_str(),index,val); +00343 <span class="keywordflow">return</span> val; +00344 } </pre></div> </td> </tr> </table> @@ -282,24 +290,54 @@ References <a class="el" href="modules_8h-source.html#l00453">fname</a>. <p> Returns true if a config file is valid. <p> -This method is unimplemented and will always return true. +This method is partially implemented and will only return false if the config file does not exist or could not be opened. <p> -Definition at line <a class="el" href="modules_8cpp-source.html#l00323">323</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. +Definition at line <a class="el" href="modules_8cpp-source.html#l00353">353</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. <p> -<div class="fragment"><pre>00324 { -00325 <span class="keywordflow">return</span> <span class="keyword">true</span>; -00326 } +References <a class="el" href="modules_8h-source.html#l00480">error</a>. +<p> +<div class="fragment"><pre>00354 { +00355 <span class="keywordflow">return</span> this-><a class="code" href="classConfigReader.html#n1">error</a>; +00356 } </pre></div> </td> </tr> </table> <hr><h2>Member Data Documentation</h2> -<a name="n0" doxytag="ConfigReader::fname"></a><p> +<a name="n0" doxytag="ConfigReader::cache"></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"> std::stringstream* ConfigReader::cache<code> [protected]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +The contents of the configuration file This protected member should never be accessed by a module (and cannot be accessed unless the core is changed). +<p> +It will contain a pointer to the configuration file data with unneeded data (such as comments) stripped from it. +<p> +Definition at line <a class="el" href="modules_8h-source.html#l00477">477</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>. +<p> +Referenced by <a class="el" href="modules_8cpp-source.html#l00319">ConfigReader()</a>, and <a class="el" href="modules_8cpp-source.html#l00326">~ConfigReader()</a>. </td> + </tr> +</table> +<a name="n1" doxytag="ConfigReader::error"></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"> std::string ConfigReader::fname<code> [protected]</code> + <td class="md" nowrap valign="top"> bool ConfigReader::error<code> [protected]</code> </table> </td> </tr> @@ -312,18 +350,18 @@ Definition at line <a class="el" href="modules_8cpp-source.html#l00323">323</a> <td> <p> -The filename of the configuration file, as set by the constructor. +Used to store errors. <p> <p> -Definition at line <a class="el" href="modules_8h-source.html#l00453">453</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>. +Definition at line <a class="el" href="modules_8h-source.html#l00480">480</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>. <p> -Referenced by <a class="el" href="modules_8cpp-source.html#l00296">ConfigReader()</a>, <a class="el" href="modules_8cpp-source.html#l00317">Enumerate()</a>, and <a class="el" href="modules_8cpp-source.html#l00309">ReadValue()</a>. </td> +Referenced by <a class="el" href="modules_8cpp-source.html#l00319">ConfigReader()</a>, and <a class="el" href="modules_8cpp-source.html#l00353">Verify()</a>. </td> </tr> </table> <hr>The documentation for this class was generated from the following files:<ul> <li><a class="el" href="modules_8h-source.html">modules.h</a><li><a class="el" href="modules_8cpp-source.html">modules.cpp</a></ul> -<hr><address style="align: right;"><small>Generated on Tue Apr 6 21:13:50 2004 for InspIRCd by +<hr><address style="align: right;"><small>Generated on Wed Apr 7 19:20:37 2004 for InspIRCd 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.3-rc3 </small></address> |