OpenGothic
Open source reimplementation of Gothic I and II
Loading...
Searching...
No Matches
IniFile Class Referencefinal

#include <inifile.h>

Public Member Functions

 IniFile ()=default
 
 IniFile (std::u16string_view file)
 
 IniFile (Tempest::RFile &fin)
 
void flush ()
 
bool has (std::string_view sec)
 
bool has (std::string_view sec, std::string_view name)
 
int getI (std::string_view sec, std::string_view name, int idef=0)
 
void set (std::string_view sec, std::string_view name, int ival)
 
float getF (std::string_view sec, std::string_view name, float fdef=0)
 
void set (std::string_view sec, std::string_view name, float fval)
 
auto getS (std::string_view sec, std::string_view name) -> std::string_view
 
void set (std::string_view sec, std::string_view name, std::string_view sval)
 

Detailed Description

Definition at line 7 of file inifile.h.

Constructor & Destructor Documentation

◆ IniFile() [1/3]

IniFile::IniFile ( )
default

◆ IniFile() [2/3]

IniFile::IniFile ( std::u16string_view  file)

Definition at line 28 of file inifile.cpp.

◆ IniFile() [3/3]

IniFile::IniFile ( Tempest::RFile &  fin)

Definition at line 48 of file inifile.cpp.

Member Function Documentation

◆ flush()

void IniFile::flush ( )

Definition at line 52 of file inifile.cpp.

◆ getF()

float IniFile::getF ( std::string_view  sec,
std::string_view  name,
float  fdef = 0 
)

Definition at line 101 of file inifile.cpp.

◆ getI()

int IniFile::getI ( std::string_view  sec,
std::string_view  name,
int  idef = 0 
)

Definition at line 87 of file inifile.cpp.

◆ getS()

std::string_view IniFile::getS ( std::string_view  sec,
std::string_view  name 
) -> std::string_view

Definition at line 115 of file inifile.cpp.

◆ has() [1/2]

bool IniFile::has ( std::string_view  sec)

Definition at line 76 of file inifile.cpp.

◆ has() [2/2]

bool IniFile::has ( std::string_view  sec,
std::string_view  name 
)

Definition at line 83 of file inifile.cpp.

◆ set() [1/3]

void IniFile::set ( std::string_view  sec,
std::string_view  name,
float  fval 
)

Definition at line 107 of file inifile.cpp.

◆ set() [2/3]

void IniFile::set ( std::string_view  sec,
std::string_view  name,
int  ival 
)

Definition at line 93 of file inifile.cpp.

◆ set() [3/3]

void IniFile::set ( std::string_view  sec,
std::string_view  name,
std::string_view  sval 
)

Definition at line 121 of file inifile.cpp.


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