Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Ogre::ConfigFile Class Reference

Class for quickly loading settings from a text file. More...

#include <OgreConfigFile.h>

List of all members.

Public Types

typedef MapIterator< std::multimap<
String, String > > 
SettingsIterator

Public Methods

 ConfigFile ()
void load (const String &filename, const String &separators="\t:=")
String getSetting (const String &key)
 Gets the first setting from the file with the named key. More...

StringVector getMultiSetting (const String &key)
 Gets all settings from the file with the named key. More...

SettingsIterator getSettingsIterator (void)
 Gets an iterator for stepping through all the keys / values in the file. More...


Protected Attributes

std::multimap< String, StringmSettings


Detailed Description

Class for quickly loading settings from a text file.

Remarks:
This class is designed to quickly parse a simple file containing key/value pairs, mainly for use in configuration settings.

This is a very simplified approach, no multiple values per key are allowed, no grouping or context is being kept etc.

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.


Member Typedef Documentation

typedef MapIterator< std::multimap<String, String> > Ogre::ConfigFile::SettingsIterator
 


Constructor & Destructor Documentation

Ogre::ConfigFile::ConfigFile  
 


Member Function Documentation

StringVector Ogre::ConfigFile::getMultiSetting const String   key
 

Gets all settings from the file with the named key.

String Ogre::ConfigFile::getSetting const String   key
 

Gets the first setting from the file with the named key.

ConfigFile::SettingsIterator Ogre::ConfigFile::getSettingsIterator void   
 

Gets an iterator for stepping through all the keys / values in the file.

void Ogre::ConfigFile::load const String   filename,
const String   separators = "\t:="
 


Member Data Documentation

std::multimap<String, String> Ogre::ConfigFile::mSettings [protected]
 

Copyright © 2002 by The OGRE Team