WoW Model Viewer
Your premiere tool for viewing, equipping and animating World of Warcraft models.
Loading...
Searching...
No Matches
core::IniFile Class Reference

Simple INI file reader/writer with section/key support. More...

#include <IniFile.h>

Public Member Functions

 IniFile (const std::string &path)
 
 IniFile (const std::wstring &path)
 
std::string getString (const std::string &key, const std::string &defaultValue="") const
 
int getInt (const std::string &key, int defaultValue=0) const
 
double getDouble (const std::string &key, double defaultValue=0.0) const
 
bool getBool (const std::string &key, bool defaultValue=false) const
 
std::wstring getWString (const std::string &key, const std::wstring &defaultValue=L"") const
 
void setValue (const std::string &key, int value)
 
void setValue (const std::string &key, double value)
 
void setValue (const std::string &key, bool value)
 
void setValue (const std::string &key, const std::string &value)
 
void setValue (const std::string &key, const std::wstring &value)
 
void sync () const
 

Private Member Functions

void load ()
 

Private Attributes

std::string m_path
 
std::wstring m_wpath
 
std::map< std::string, std::string > m_data
 

Detailed Description

Simple INI file reader/writer with section/key support.

Keys are stored as "section/key" internally. Supports string, int, double, bool, and wide-string values. Backward-compatible with QSettings-style quoted strings.

Definition at line 14 of file IniFile.h.

Constructor & Destructor Documentation

◆ IniFile() [1/2]

core::IniFile::IniFile ( const std::string &  path)
inlineexplicit

Definition at line 17 of file IniFile.h.

Here is the call graph for this function:

◆ IniFile() [2/2]

core::IniFile::IniFile ( const std::wstring &  path)
inlineexplicit

Definition at line 22 of file IniFile.h.

Here is the call graph for this function:

Member Function Documentation

◆ getBool()

bool core::IniFile::getBool ( const std::string &  key,
bool  defaultValue = false 
) const
inline

Definition at line 58 of file IniFile.h.

Here is the caller graph for this function:

◆ getDouble()

double core::IniFile::getDouble ( const std::string &  key,
double  defaultValue = 0.0 
) const
inline

Definition at line 49 of file IniFile.h.

Here is the caller graph for this function:

◆ getInt()

int core::IniFile::getInt ( const std::string &  key,
int  defaultValue = 0 
) const
inline

Definition at line 40 of file IniFile.h.

Here is the caller graph for this function:

◆ getString()

std::string core::IniFile::getString ( const std::string &  key,
const std::string &  defaultValue = "" 
) const
inline

Definition at line 27 of file IniFile.h.

Here is the caller graph for this function:

◆ getWString()

std::wstring core::IniFile::getWString ( const std::string &  key,
const std::wstring &  defaultValue = L"" 
) const
inline

Definition at line 69 of file IniFile.h.

Here is the call graph for this function:

◆ load()

void core::IniFile::load ( )
inlineprivate

Definition at line 154 of file IniFile.h.

Here is the caller graph for this function:

◆ setValue() [1/5]

void core::IniFile::setValue ( const std::string &  key,
bool  value 
)
inline

Definition at line 93 of file IniFile.h.

◆ setValue() [2/5]

void core::IniFile::setValue ( const std::string &  key,
const std::string &  value 
)
inline

Definition at line 98 of file IniFile.h.

◆ setValue() [3/5]

void core::IniFile::setValue ( const std::string &  key,
const std::wstring &  value 
)
inline

Definition at line 103 of file IniFile.h.

◆ setValue() [4/5]

void core::IniFile::setValue ( const std::string &  key,
double  value 
)
inline

Definition at line 88 of file IniFile.h.

◆ setValue() [5/5]

void core::IniFile::setValue ( const std::string &  key,
int  value 
)
inline

Definition at line 83 of file IniFile.h.

Here is the caller graph for this function:

◆ sync()

void core::IniFile::sync ( ) const
inline

Definition at line 119 of file IniFile.h.

Here is the caller graph for this function:

Member Data Documentation

◆ m_data

std::map<std::string, std::string> core::IniFile::m_data
private

Definition at line 205 of file IniFile.h.

◆ m_path

std::string core::IniFile::m_path
private

Definition at line 203 of file IniFile.h.

◆ m_wpath

std::wstring core::IniFile::m_wpath
private

Definition at line 204 of file IniFile.h.


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