-
Notifications
You must be signed in to change notification settings - Fork 0
/
Config.h
executable file
·31 lines (26 loc) · 1019 Bytes
/
Config.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef __CONFIG_H
#define __CONFIG_H
#include "Definition.h"
#include "SimpleString.h"
#pragma warning( push )
#pragma warning( disable : 4512 )
class Config {
private:
void * m_pVariables;
void * m_pSections;
const SimpleString m_sFileName;
SimpleString m_sCurrentSection;
bool m_bLoaded;
public:
bool GetByNameAsBoolean(const SimpleString & sName, bool bDefault) const;
double GetByNameAsFloat(const SimpleString & sName, double fDefault) const;
const SimpleString &GetByNameAsString(const SimpleString &sName, const SimpleString & sDefault) const;
int GetByNameAsInteger(const SimpleString &sName, int lDefault) const;
vector3d GetByNameAsVector(const SimpleString &sName, const vector3d& vDefault) const;
point GetByNameAsPoint(const SimpleString &sName, const point& ptDefault) const;
int SetSection(const SimpleString &sName);
~Config();
Config(const SimpleString &sFileName);
};
#pragma warning( pop )
#endif