<html> <head> <title>Ogre::ConfigFile class Reference - OGRE Documentation</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link type="text/css" rel="stylesheet" href="style.css"> </head> <body> <!-- Generated by Doxygen 1.2.16 --> <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="namespacemembers.html">Namespace Members</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> <a class="qindex" href="pages.html">Related Pages</a> </center> <hr><h1>Ogre::ConfigFile Class Reference</h1>Class for quickly loading settings from a text file. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="OgreConfigFile_8h-source.html">OgreConfigFile.h</a>></code> <p> <a href="classOgre_1_1ConfigFile-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0> <tr><td colspan=2><br><h2>Public Types</h2></td></tr> <tr><td nowrap align=right valign=top>typedef <a class="el" href="classOgre_1_1MapIterator.html">MapIterator</a>< std::multimap<<br> <a class="el" href="classOgre_1_1String.html">String</a>, <a class="el" href="classOgre_1_1String.html">String</a> > > </td><td valign=bottom><a class="el" href="classOgre_1_1ConfigFile.html#Ogre_1_1ConfigFiles0">SettingsIterator</a></td></tr> <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="classOgre_1_1ConfigFile.html#Ogre_1_1ConfigFilea0">ConfigFile</a> ()</td></tr> <tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classOgre_1_1ConfigFile.html#Ogre_1_1ConfigFilea1">load</a> (const <a class="el" href="classOgre_1_1String.html">String</a> &filename, const <a class="el" href="classOgre_1_1String.html">String</a> &separators="\t:=", bool trimWhitespace=true)</td></tr> <tr><td nowrap align=right valign=top><a class="el" href="classOgre_1_1String.html">String</a> </td><td valign=bottom><a class="el" href="classOgre_1_1ConfigFile.html#Ogre_1_1ConfigFilea2">getSetting</a> (const <a class="el" href="classOgre_1_1String.html">String</a> &key) const</td></tr> <tr><td> </td><td><font size=-1><em>Gets the first setting from the file with the named key.</em> <a href="#Ogre_1_1ConfigFilea2"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top><a class="el" href="namespaceOgre.html#a436">StringVector</a> </td><td valign=bottom><a class="el" href="classOgre_1_1ConfigFile.html#Ogre_1_1ConfigFilea3">getMultiSetting</a> (const <a class="el" href="classOgre_1_1String.html">String</a> &key) const</td></tr> <tr><td> </td><td><font size=-1><em>Gets all settings from the file with the named key.</em> <a href="#Ogre_1_1ConfigFilea3"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top><a class="el" href="classOgre_1_1ConfigFile.html#Ogre_1_1ConfigFiles0">SettingsIterator</a> </td><td valign=bottom><a class="el" href="classOgre_1_1ConfigFile.html#Ogre_1_1ConfigFilea4">getSettingsIterator</a> (void)</td></tr> <tr><td> </td><td><font size=-1><em>Gets an iterator for stepping through all the keys / values in the file.</em> <a href="#Ogre_1_1ConfigFilea4"></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::multimap< <a class="el" href="classOgre_1_1String.html">String</a>, <a class="el" href="classOgre_1_1String.html">String</a> > </td><td valign=bottom><a class="el" href="classOgre_1_1ConfigFile.html#Ogre_1_1ConfigFilen0">mSettings</a></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> Class for quickly loading settings from a text file. <p> <dl compact><dt><b> Remarks: </b><dd> This class is designed to quickly parse a simple file containing key/value pairs, mainly for use in configuration settings. <p> This is a very simplified approach, no multiple values per key are allowed, no grouping or context is being kept etc. <p> By default the key/values pairs are tokenised based on a separator of Tab, the colon (:) or equals (=) character. Each key - value pair must end in a carriage return. </dl> <p> <p> Definition at line <a class="el" href="OgreConfigFile_8h-source.html#l00048">48</a> of file <a class="el" href="OgreConfigFile_8h-source.html">OgreConfigFile.h</a>.<hr><h2>Member Typedef Documentation</h2> <a name="Ogre_1_1ConfigFiles0" doxytag="Ogre::ConfigFile::SettingsIterator"></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"> typedef <a class="el" href="classOgre_1_1MapIterator.html">MapIterator</a>< std::multimap<<a class="el" href="classOgre_1_1String.html">String</a>, <a class="el" href="classOgre_1_1String.html">String</a>> > Ogre::ConfigFile::SettingsIterator </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> <p> Definition at line <a class="el" href="OgreConfigFile_8h-source.html#l00060">60</a> of file <a class="el" href="OgreConfigFile_8h-source.html">OgreConfigFile.h</a>. <p> Referenced by <a class="el" href="OgreConfigFile_8cpp-source.html#l00114">getSettingsIterator</a>(). </td> </tr> </table> <hr><h2>Constructor & Destructor Documentation</h2> <a name="Ogre_1_1ConfigFilea0" doxytag="Ogre::ConfigFile::ConfigFile"></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"> Ogre::ConfigFile::ConfigFile </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </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> <p> Definition at line <a class="el" href="OgreConfigFile_8cpp-source.html#l00033">33</a> of file <a class="el" href="OgreConfigFile_8cpp-source.html">OgreConfigFile.cpp</a>. </td> </tr> </table> <hr><h2>Member Function Documentation</h2> <a name="Ogre_1_1ConfigFilea3" doxytag="Ogre::ConfigFile::getMultiSetting"></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"> <a class="el" href="namespaceOgre.html#a436">StringVector</a> Ogre::ConfigFile::getMultiSetting </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classOgre_1_1String.html">String</a> & </td> <td class="mdname1" valign="top" nowrap> <em>key</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap> const</td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Gets all settings from the file with the named key. <p> <p> Definition at line <a class="el" href="OgreConfigFile_8cpp-source.html#l00095">95</a> of file <a class="el" href="OgreConfigFile_8cpp-source.html">OgreConfigFile.cpp</a>. <p> References <a class="el" href="OgreConfigFile_8h-source.html#l00065">mSettings</a>, and <a class="el" href="OgreStringVector_8h-source.html#l00035">Ogre::StringVector</a>. <p> Referenced by <a class="el" href="OgreRoot_8cpp-source.html#l00624">Ogre::Root::loadPlugins</a>(). </td> </tr> </table> <a name="Ogre_1_1ConfigFilea2" doxytag="Ogre::ConfigFile::getSetting"></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"> <a class="el" href="classOgre_1_1String.html">String</a> Ogre::ConfigFile::getSetting </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classOgre_1_1String.html">String</a> & </td> <td class="mdname1" valign="top" nowrap> <em>key</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap> const</td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Gets the first setting from the file with the named key. <p> <p> Definition at line <a class="el" href="OgreConfigFile_8cpp-source.html#l00080">80</a> of file <a class="el" href="OgreConfigFile_8cpp-source.html">OgreConfigFile.cpp</a>. <p> References <a class="el" href="OgreConfigFile_8h-source.html#l00065">mSettings</a>. <p> Referenced by <a class="el" href="OgreRoot_8cpp-source.html#l00624">Ogre::Root::loadPlugins</a>(), <a class="el" href="OgreRoot_8cpp-source.html#l00294">Ogre::Root::restoreConfig</a>(), and <a class="el" href="OgreTerrainSceneManager_8cpp-source.html#l00048">Ogre::TerrainSceneManager::setWorldGeometry</a>(). </td> </tr> </table> <a name="Ogre_1_1ConfigFilea4" doxytag="Ogre::ConfigFile::getSettingsIterator"></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"> <a class="el" href="classOgre_1_1ConfigFile.html#Ogre_1_1ConfigFiles0">ConfigFile::SettingsIterator</a> Ogre::ConfigFile::getSettingsIterator </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">void </td> <td class="mdname1" valign="top" nowrap> </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> Gets an iterator for stepping through all the keys / values in the file. <p> <p> Definition at line <a class="el" href="OgreConfigFile_8cpp-source.html#l00114">114</a> of file <a class="el" href="OgreConfigFile_8cpp-source.html">OgreConfigFile.cpp</a>. <p> References <a class="el" href="OgreConfigFile_8h-source.html#l00065">mSettings</a>, and <a class="el" href="OgreConfigFile_8h-source.html#l00060">SettingsIterator</a>. <p> Referenced by <a class="el" href="OgreRoot_8cpp-source.html#l00294">Ogre::Root::restoreConfig</a>(). </td> </tr> </table> <a name="Ogre_1_1ConfigFilea1" doxytag="Ogre::ConfigFile::load"></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 Ogre::ConfigFile::load </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classOgre_1_1String.html">String</a> & </td> <td class="mdname" nowrap> <em>filename</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>const <a class="el" href="classOgre_1_1String.html">String</a> & </td> <td class="mdname" nowrap> <em>separators</em> = "\t:=", </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>bool </td> <td class="mdname" nowrap> <em>trimWhitespace</em> = true</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> <p> Definition at line <a class="el" href="OgreConfigFile_8cpp-source.html#l00037">37</a> of file <a class="el" href="OgreConfigFile_8cpp-source.html">OgreConfigFile.cpp</a>. <p> References <a class="el" href="OgreException_8h-source.html#l00033">Except</a>, <a class="el" href="OgreConfigFile_8h-source.html#l00065">mSettings</a>, and <a class="el" href="OgreString_8cpp-source.html#l00034">Ogre::String::trim</a>(). <p> Referenced by <a class="el" href="OgreRoot_8cpp-source.html#l00624">Ogre::Root::loadPlugins</a>(), <a class="el" href="OgreRoot_8cpp-source.html#l00294">Ogre::Root::restoreConfig</a>(), and <a class="el" href="OgreTerrainSceneManager_8cpp-source.html#l00048">Ogre::TerrainSceneManager::setWorldGeometry</a>(). </td> </tr> </table> <hr><h2>Member Data Documentation</h2> <a name="Ogre_1_1ConfigFilen0" doxytag="Ogre::ConfigFile::mSettings"></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::multimap<<a class="el" href="classOgre_1_1String.html">String</a>, <a class="el" href="classOgre_1_1String.html">String</a>> Ogre::ConfigFile::mSettings<code> [protected]</code> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> <p> Definition at line <a class="el" href="OgreConfigFile_8h-source.html#l00065">65</a> of file <a class="el" href="OgreConfigFile_8h-source.html">OgreConfigFile.h</a>. <p> Referenced by <a class="el" href="OgreConfigFile_8cpp-source.html#l00095">getMultiSetting</a>(), <a class="el" href="OgreConfigFile_8cpp-source.html#l00080">getSetting</a>(), <a class="el" href="OgreConfigFile_8cpp-source.html#l00114">getSettingsIterator</a>(), and <a class="el" href="OgreConfigFile_8cpp-source.html#l00037">load</a>(). </td> </tr> </table> <hr>The documentation for this class was generated from the following files:<ul> <li><a class="el" href="OgreConfigFile_8h-source.html">OgreConfigFile.h</a><li><a class="el" href="OgreConfigFile_8cpp-source.html">OgreConfigFile.cpp</a></ul> <p> Copyright © 2002-2003 by The OGRE Team<br /> Last modified Wed Jan 21 00:17:07 2004 </p> </body> </html>