OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
loadbook.hpp
Go to the documentation of this file.
1 #ifndef OPENMW_ESM_BOOK_H
2 #define OPENMW_ESM_BOOK_H
3 
4 #include <string>
5 
6 namespace ESM
7 {
8 /*
9  * Books, magic scrolls, notes and so on
10  */
11 
12 class ESMReader;
13 class ESMWriter;
14 
15 struct Book
16 {
17  static unsigned int sRecordId;
19  static std::string getRecordType() { return "Book"; }
20 
21  struct BKDTstruct
22  {
23  float mWeight;
25  };
26 
28  std::string mName, mModel, mIcon, mScript, mEnchant, mText;
29  std::string mId;
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 load(ESMReader &esm, bool &isDeleted)
Definition: loadbook.cpp:11
int mValue
Definition: loadbook.hpp:24
std::string mEnchant
Definition: loadbook.hpp:28
Definition: esmreader.hpp:21
void save(ESMWriter &esm, bool isDeleted=false) const
Definition: loadbook.cpp:63
int mIsScroll
Definition: loadbook.hpp:24
std::string mModel
Definition: loadbook.hpp:28
std::string mId
Definition: loadbook.hpp:29
static std::string getRecordType()
Return a string descriptor for this record type. Currently used for debugging / error logs only...
Definition: loadbook.hpp:19
BKDTstruct mData
Definition: loadbook.hpp:27
Definition: esmwriter.hpp:17
int mSkillID
Definition: loadbook.hpp:24
int mEnchant
Definition: loadbook.hpp:24
std::string mText
Definition: loadbook.hpp:28
void blank()
Set record to default state (does not touch the ID).
Definition: loadbook.cpp:82
std::string mScript
Definition: loadbook.hpp:28
Definition: loadbook.hpp:21
std::string mIcon
Definition: loadbook.hpp:28
float mWeight
Definition: loadbook.hpp:23
Definition: loadbook.hpp:15
static unsigned int sRecordId
Definition: loadbook.hpp:17
std::string mName
Definition: loadbook.hpp:28