summaryrefslogtreecommitdiff
path: root/docs/module-doc/classConfigReader.html
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2003-01-23 19:45:57 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2003-01-23 19:45:57 +0000
commit73b9d0c5cb02f0ea8350de28bc3687e0af70ea0f (patch)
treea5845579b1363762650f0e45c62a13890e1efa43 /docs/module-doc/classConfigReader.html
Initial revision
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@132 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'docs/module-doc/classConfigReader.html')
-rw-r--r--docs/module-doc/classConfigReader.html324
1 files changed, 324 insertions, 0 deletions
diff --git a/docs/module-doc/classConfigReader.html b/docs/module-doc/classConfigReader.html
new file mode 100644
index 000000000..f0221a1a1
--- /dev/null
+++ b/docs/module-doc/classConfigReader.html
@@ -0,0 +1,324 @@
+<!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>ConfigReader class Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3-rc2 -->
+<center>
+<a class="qindex" href="main.html">Main Page</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center>
+<hr><h1>ConfigReader Class Reference</h1>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.
+<a href="#_details">More...</a>
+<p>
+<code>#include &lt;<a class="el" href="modules_8h-source.html">modules.h</a>&gt;</code>
+<p>
+<a href="classConfigReader-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
+<tr><td></td></tr>
+<tr><td colspan=2><br><h2>Public Methods</h2></td></tr>
+<tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classConfigReader.html#a0">ConfigReader</a> ()</td></tr>
+<tr><td>&nbsp;</td><td><font size=-1><em>Default constructor.</em> <a href="#a0"></a><em></em></font><br><br></td></tr>
+<tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classConfigReader.html#a1">ConfigReader</a> (string filename)</td></tr>
+<tr><td>&nbsp;</td><td><font size=-1><em>Overloaded constructor.</em> <a href="#a1"></a><em></em></font><br><br></td></tr>
+<tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classConfigReader.html#a2">~ConfigReader</a> ()</td></tr>
+<tr><td>&nbsp;</td><td><font size=-1><em>Default destructor.</em> <a href="#a2"></a><em></em></font><br><br></td></tr>
+<tr><td nowrap align=right valign=top>string&nbsp;</td><td valign=bottom><a class="el" href="classConfigReader.html#a3">ReadValue</a> (string tag, string name, int index)</td></tr>
+<tr><td>&nbsp;</td><td><font size=-1><em>Retrieves a value from the config file.</em> <a href="#a3"></a><em></em></font><br><br></td></tr>
+<tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="classConfigReader.html#a4">Enumerate</a> (string tag)</td></tr>
+<tr><td>&nbsp;</td><td><font size=-1><em>Counts the number of times a given tag appears in the config file.</em> <a href="#a4"></a><em></em></font><br><br></td></tr>
+<tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classConfigReader.html#a5">Verify</a> ()</td></tr>
+<tr><td>&nbsp;</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>string&nbsp;</td><td valign=bottom><a class="el" href="classConfigReader.html#n0">fname</a></td></tr>
+<tr><td>&nbsp;</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>
+</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.
+<p>
+It may either be instantiated with one parameter or none. Constructing the class using one parameter allows you to specify a path to your own configuration file, otherwise, inspircd.conf is read.
+<p>
+
+<p>
+Definition at line <a class="el" href="modules_8h-source.html#l00226">226</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2>
+<a name="a0" doxytag="ConfigReader::ConfigReader"></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"> ConfigReader::ConfigReader </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap>&nbsp; </td>
+ <td class="md" valign="top">)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+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#l00161">161</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
+<p>
+References <a class="el" href="modules_8h-source.html#l00231">fname</a>.
+<p>
+<div class="fragment"><pre>00162 {
+00163 <a class="code" href="classConfigReader.html#n0">fname</a> = CONFIG_FILE;
+00164 }
+</pre></div> </td>
+ </tr>
+</table>
+<a name="a1" doxytag="ConfigReader::ConfigReader"></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"> ConfigReader::ConfigReader </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">string&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap>&nbsp; <em>filename</em> </td>
+ <td class="md" valign="top">)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+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#l00172">172</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
+<p>
+<div class="fragment"><pre>00172 : <a class="code" href="classConfigReader.html#n0">fname</a>(filename) { };
+</pre></div> </td>
+ </tr>
+</table>
+<a name="a2" doxytag="ConfigReader::~ConfigReader"></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"> ConfigReader::~ConfigReader </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap>&nbsp; </td>
+ <td class="md" valign="top">)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Default destructor.
+<p>
+This method destroys the ConfigReader class.
+<p>
+Definition at line <a class="el" href="modules_8cpp-source.html#l00167">167</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
+<p>
+<div class="fragment"><pre>00168 {
+00169 }
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Member Function Documentation</h2>
+<a name="a4" doxytag="ConfigReader::Enumerate"></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"> int ConfigReader::Enumerate </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">string&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap>&nbsp; <em>tag</em> </td>
+ <td class="md" valign="top">)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+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#l00183">183</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
+<p>
+References <a class="el" href="modules_8h-source.html#l00231">fname</a>.
+<p>
+<div class="fragment"><pre>00184 {
+00185 <span class="keywordflow">return</span> EnumConf(<a class="code" href="classConfigReader.html#n0">fname</a>.c_str(),tag.c_str());
+00186 }
+</pre></div> </td>
+ </tr>
+</table>
+<a name="a3" doxytag="ConfigReader::ReadValue"></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"> string ConfigReader::ReadValue </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">string&nbsp;</td>
+ <td class="mdname" nowrap>&nbsp; <em>tag</em>, </td>
+ </tr>
+ <tr>
+ <td></td>
+ <td></td>
+ <td class="md" nowrap>string&nbsp;</td>
+ <td class="mdname" nowrap>&nbsp; <em>name</em>, </td>
+ </tr>
+ <tr>
+ <td></td>
+ <td></td>
+ <td class="md" nowrap>int&nbsp;</td>
+ <td class="mdname" nowrap>&nbsp; <em>index</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+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#l00174">174</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
+<p>
+References <a class="el" href="modules_8h-source.html#l00231">fname</a>.
+<p>
+<div class="fragment"><pre>00175 {
+00176 <span class="keywordtype">char</span> val[MAXBUF];
+00177 ReadConf(<a class="code" href="classConfigReader.html#n0">fname</a>.c_str(),tag.c_str(),name.c_str(),index,val);
+00178 string s = val;
+00179 <span class="keywordflow">return</span> s;
+00180 }
+</pre></div> </td>
+ </tr>
+</table>
+<a name="a5" doxytag="ConfigReader::Verify"></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"> bool ConfigReader::Verify </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap>&nbsp; </td>
+ <td class="md" valign="top">)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Returns true if a config file is valid.
+<p>
+This method is unimplemented and will always return true.
+<p>
+Definition at line <a class="el" href="modules_8cpp-source.html#l00189">189</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
+<p>
+<div class="fragment"><pre>00190 {
+00191 <span class="keywordflow">return</span> <span class="keyword">true</span>;
+00192 }
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Member Data Documentation</h2>
+<a name="n0" doxytag="ConfigReader::fname"></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"> string ConfigReader::fname<code> [protected]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+The filename of the configuration file, as set by the constructor.
+<p>
+
+<p>
+Definition at line <a class="el" href="modules_8h-source.html#l00231">231</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#l00161">ConfigReader()</a>, <a class="el" href="modules_8cpp-source.html#l00183">Enumerate()</a>, and <a class="el" href="modules_8cpp-source.html#l00174">ReadValue()</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 Wed Jan 22 20:56:47 2003 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-rc2 </small></address>
+</body>
+</html>