RigsofRods
Soft-body Physics Simulation
Public Member Functions | Private Member Functions | Private Attributes
RoR::ConfigFile Class Reference

Adds direct parsing of custom types. More...

#include <ConfigFile.h>

+ Inheritance diagram for RoR::ConfigFile:
+ Collaboration diagram for RoR::ConfigFile:

Public Member Functions

Ogre::ColourValue getColourValue (Ogre::String const &key, Ogre::ColourValue const &defaultValue=Ogre::ColourValue())
 
Ogre::ColourValue getColourValue (Ogre::String const &key, Ogre::String const &section, Ogre::ColourValue const &defaultValue=Ogre::ColourValue())
 
Ogre::Vector3 getVector3 (Ogre::String const &key, Ogre::String const &section, Ogre::Vector3 const &defaultValue=Ogre::Vector3::ZERO)
 
float getFloat (Ogre::String const &key, float defaultValue=0.f)
 
float getFloat (Ogre::String const &key, Ogre::String const &section, float defaultValue=0.f)
 
bool getBool (Ogre::String const &key, bool defaultValue=false)
 
bool getBool (Ogre::String const &key, Ogre::String const &section, bool defaultValue=false)
 
int getInt (Ogre::String const &key, int defaultValue=0)
 
int getInt (Ogre::String const &key, Ogre::String const &section, int defaultValue=0)
 
Ogre::String getString (Ogre::String const &key, Ogre::String const &section, Ogre::String const &defaultValue="")
 
void SetString (Ogre::String key, Ogre::String value, Ogre::String section=Ogre::BLANKSTRING)
 
bool HasSection (std::string const &name)
 
void setLoggingInfo (std::string const &filename, Console::MessageArea area)
 

Private Member Functions

Ogre::String getSetting (Ogre::String, Ogre::String)
 
Ogre::String getSetting (Ogre::String, Ogre::String, Ogre::String)
 
void logMessage (std::string const &msg)
 

Private Attributes

std::string m_log_filename
 
Console::MessageArea m_log_area = Console::CONSOLE_MSGTYPE_INFO
 

Detailed Description

Adds direct parsing of custom types.

Definition at line 37 of file ConfigFile.h.

Member Function Documentation

◆ getBool() [1/2]

bool RoR::ConfigFile::getBool ( Ogre::String const &  key,
bool  defaultValue = false 
)
inline

Definition at line 57 of file ConfigFile.h.

+ Here is the caller graph for this function:

◆ getBool() [2/2]

bool ConfigFile::getBool ( Ogre::String const &  key,
Ogre::String const &  section,
bool  defaultValue = false 
)

Definition at line 84 of file ConfigFile.cpp.

◆ getColourValue() [1/2]

Ogre::ColourValue RoR::ConfigFile::getColourValue ( Ogre::String const &  key,
Ogre::ColourValue const &  defaultValue = Ogre::ColourValue() 
)
inline

Definition at line 41 of file ConfigFile.h.

◆ getColourValue() [2/2]

Ogre::ColourValue ConfigFile::getColourValue ( Ogre::String const &  key,
Ogre::String const &  section,
Ogre::ColourValue const &  defaultValue = Ogre::ColourValue() 
)

Definition at line 45 of file ConfigFile.cpp.

+ Here is the call graph for this function:

◆ getFloat() [1/2]

float RoR::ConfigFile::getFloat ( Ogre::String const &  key,
float  defaultValue = 0.f 
)
inline

Definition at line 50 of file ConfigFile.h.

◆ getFloat() [2/2]

float ConfigFile::getFloat ( Ogre::String const &  key,
Ogre::String const &  section,
float  defaultValue = 0.f 
)

Definition at line 40 of file ConfigFile.cpp.

◆ getInt() [1/2]

int RoR::ConfigFile::getInt ( Ogre::String const &  key,
int  defaultValue = 0 
)
inline

Definition at line 64 of file ConfigFile.h.

+ Here is the caller graph for this function:

◆ getInt() [2/2]

int ConfigFile::getInt ( Ogre::String const &  key,
Ogre::String const &  section,
int  defaultValue = 0 
)

Definition at line 79 of file ConfigFile.cpp.

◆ getSetting() [1/2]

Ogre::String RoR::ConfigFile::getSetting ( Ogre::String  ,
Ogre::String   
)
private

◆ getSetting() [2/2]

Ogre::String RoR::ConfigFile::getSetting ( Ogre::String  ,
Ogre::String  ,
Ogre::String   
)
private

◆ getString()

Ogre::String ConfigFile::getString ( Ogre::String const &  key,
Ogre::String const &  section,
Ogre::String const &  defaultValue = "" 
)

Definition at line 89 of file ConfigFile.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getVector3()

Ogre::Vector3 ConfigFile::getVector3 ( Ogre::String const &  key,
Ogre::String const &  section,
Ogre::Vector3 const &  defaultValue = Ogre::Vector3::ZERO 
)

Definition at line 62 of file ConfigFile.cpp.

+ Here is the call graph for this function:

◆ HasSection()

bool ConfigFile::HasSection ( std::string const &  name)

Definition at line 117 of file ConfigFile.cpp.

◆ logMessage()

void ConfigFile::logMessage ( std::string const &  msg)
private

Definition at line 124 of file ConfigFile.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setLoggingInfo()

void RoR::ConfigFile::setLoggingInfo ( std::string const &  filename,
Console::MessageArea  area 
)
inline

Definition at line 77 of file ConfigFile.h.

+ Here is the caller graph for this function:

◆ SetString()

void ConfigFile::SetString ( Ogre::String  key,
Ogre::String  value,
Ogre::String  section = Ogre::BLANKSTRING 
)

Definition at line 99 of file ConfigFile.cpp.

+ Here is the call graph for this function:

Field Documentation

◆ m_log_area

Console::MessageArea RoR::ConfigFile::m_log_area = Console::CONSOLE_MSGTYPE_INFO
private

Definition at line 92 of file ConfigFile.h.

◆ m_log_filename

std::string RoR::ConfigFile::m_log_filename
private

Definition at line 91 of file ConfigFile.h.


The documentation for this class was generated from the following files: