SUPER Space invader : Turbo edition DX - VS GOD 1.0.0
A simple space invader ripoff
configManagement.h
Go to the documentation of this file.
1
12#ifndef SPACE_CONFIGMANAGEMENT_H
13#define SPACE_CONFIGMANAGEMENT_H
14
15#include<climits>
16
17/* This header will only be imported once, but Djalim told me he would hurt me
18 * if I didn't move it into his own header file instead of the cpp file*/
19
21public:
23 void parseFile(const string& fname);
24 void readConfig();
25 void dumpInternalValues() const;
26private:
27 map<string, string> internalValues;
28
29 const string& getString(const configKey& key, const string& def) const;
30 const string& getString(const configKey& key) const;
31 char getChar(const configKey& key, char def) const;
32 char getChar(const configKey& key) const;
33 int getInt(const configKey& key, int def, int min=INT_MIN, int max=INT_MAX) const;
34 int getInt(const configKey& key) const;
35 void getColor(const configKey& key, nsGraphics::RGBAcolor& color, const nsGraphics::RGBAcolor& def) const;
36 void getColor(const configKey& key, nsGraphics::RGBAcolor& color) const;
37 void getList(const configKey& key, vector<string>& vec) const;
38
39 void readGrid(const configKey& baseKey);
40 void readPlayer(const configKey& baseKey, PlayerDef&);
41 void readInvaderType(const configKey& baseKey, InvaderTypeDef&);
42};
43
44#endif
void parseFile(const string &fname)
ConfigData collectedData
void dumpInternalValues() const
string configKey
Definition: configData.h:20
this struct stores all relevant data from the configuration file
Definition: configData.h:27
defines an invader type
Definition: invaderDef.h:21
player data, contains colors and key configuration
Definition: playerDef.h:42