OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
loadgmst.hpp
Go to the documentation of this file.
1 #ifndef OPENMW_ESM_GMST_H
2 #define OPENMW_ESM_GMST_H
3 
4 #include <string>
5 
6 #include "variant.hpp"
7 
8 namespace ESM
9 {
10 
11 class ESMReader;
12 class ESMWriter;
13 
14 /*
15  * Game setting
16  *
17  */
18 
20 {
21  static unsigned int sRecordId;
23  static std::string getRecordType() { return "GameSetting"; }
24 
25  std::string mId;
26 
28 
29  void load(ESMReader &esm, bool &isDeleted);
30 
32 
33  int getInt() const;
35 
36  float getFloat() const;
38 
39  std::string getString() const;
41 
42  void save(ESMWriter &esm, bool isDeleted = false) const;
43 
44  void blank();
46 };
47 
48  bool operator== (const GameSetting& left, const GameSetting& right);
49 }
50 #endif
bool operator==(const CellId &left, const CellId &right)
Definition: cellid.cpp:29
Definition: esmreader.hpp:21
Definition: loadgmst.hpp:19
float getFloat() const
Throws an exception if GMST is not of type int or float.
Definition: loadgmst.cpp:30
void load(ESMReader &esm, bool &isDeleted)
Definition: loadgmst.cpp:11
Definition: esmwriter.hpp:17
std::string mId
Definition: loadgmst.hpp:25
int getInt() const
Throws an exception if GMST is not of type int or float.
Definition: loadgmst.cpp:25
void save(ESMWriter &esm, bool isDeleted=false) const
Definition: loadgmst.cpp:19
static std::string getRecordType()
Return a string descriptor for this record type. Currently used for debugging / error logs only...
Definition: loadgmst.hpp:23
void blank()
Set record to default state (does not touch the ID).
Definition: loadgmst.cpp:40
Definition: variant.hpp:25
Variant mValue
Definition: loadgmst.hpp:27
static unsigned int sRecordId
Definition: loadgmst.hpp:21
std::string getString() const
Throwns an exception if GMST is not of type string.
Definition: loadgmst.cpp:35