OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
loadrepa.hpp
Go to the documentation of this file.
1 #ifndef OPENMW_ESM_REPA_H
2 #define OPENMW_ESM_REPA_H
3 
4 #include <string>
5 
6 namespace ESM
7 {
8 
9 class ESMReader;
10 class ESMWriter;
11 
12 struct Repair
13 {
14  static unsigned int sRecordId;
16  static std::string getRecordType() { return "Repair"; }
17 
18  struct Data
19  {
20  float mWeight;
21  int mValue;
22 
23  int mUses;
24  float mQuality;
25  }; // Size = 16
26 
28  std::string mId, mName, mModel, mIcon, mScript;
29 
30  void load(ESMReader &esm, bool &isDeleted);
31  void save(ESMWriter &esm, bool isDeleted = false) const;
32 
33  void blank();
35 };
36 
37 }
38 #endif
std::string mId
Definition: loadrepa.hpp:28
static std::string getRecordType()
Return a string descriptor for this record type. Currently used for debugging / error logs only...
Definition: loadrepa.hpp:16
Definition: esmreader.hpp:21
void save(ESMWriter &esm, bool isDeleted=false) const
Definition: loadrepa.cpp:58
int mValue
Definition: loadrepa.hpp:21
Definition: esmwriter.hpp:17
std::string mModel
Definition: loadrepa.hpp:28
std::string mScript
Definition: loadrepa.hpp:28
std::string mName
Definition: loadrepa.hpp:28
void load(ESMReader &esm, bool &isDeleted)
Definition: loadrepa.cpp:11
void blank()
Set record to default state (does not touch the ID).
Definition: loadrepa.cpp:76
float mWeight
Definition: loadrepa.hpp:20
std::string mIcon
Definition: loadrepa.hpp:28
int mUses
Definition: loadrepa.hpp:23
static unsigned int sRecordId
Definition: loadrepa.hpp:14
Definition: loadrepa.hpp:18
float mQuality
Definition: loadrepa.hpp:24
Data mData
Definition: loadrepa.hpp:27
Definition: loadrepa.hpp:12