OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
loadstat.hpp
Go to the documentation of this file.
1 #ifndef OPENMW_ESM_STAT_H
2 #define OPENMW_ESM_STAT_H
3 
4 #include <string>
5 
6 namespace ESM {
7 
8 class ESMReader;
9 class ESMWriter;
10 
11 /*
12  * Definition of static object.
13  *
14  * A stat record is basically just a reference to a nif file. Some
15  * esps seem to contain copies of the STAT entries from the esms, and
16  * the esms themselves contain several identical entries. Perhaps all
17  * statics referenced in a file is also put in the file? Since we are
18  * only reading files it doesn't much matter to us, but it would if we
19  * were writing our own ESM/ESPs. You can check some files later when
20  * you decode the CELL blocks, if you want to test this hypothesis.
21  */
22 
23 struct Static
24 {
25  static unsigned int sRecordId;
27  static std::string getRecordType() { return "Static"; }
28 
29  std::string mId, mModel;
30 
31  void load(ESMReader &esm, bool &isDeleted);
32  void save(ESMWriter &esm, bool isDeleted = false) const;
33 
34  void blank();
36 };
37 }
38 #endif
void save(ESMWriter &esm, bool isDeleted=false) const
Definition: loadstat.cpp:41
Definition: esmreader.hpp:21
void load(ESMReader &esm, bool &isDeleted)
Definition: loadstat.cpp:11
static unsigned int sRecordId
Definition: loadstat.hpp:25
void blank()
Set record to default state (does not touch the ID).
Definition: loadstat.cpp:54
Definition: esmwriter.hpp:17
static std::string getRecordType()
Return a string descriptor for this record type. Currently used for debugging / error logs only...
Definition: loadstat.hpp:27
std::string mId
Definition: loadstat.hpp:29
std::string mModel
Definition: loadstat.hpp:29
Definition: loadstat.hpp:23