OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
record.hpp
Go to the documentation of this file.
1 /*
2  OpenMW - The completely unofficial reimplementation of Morrowind
3  Copyright (C) 2008-2010 Nicolay Korslund
4  Email: < korslund@gmail.com >
5  WWW: http://openmw.sourceforge.net/
6 
7  This file (record.h) is part of the OpenMW package.
8 
9  OpenMW is distributed as free software: you can redistribute it
10  and/or modify it under the terms of the GNU General Public License
11  version 3, as published by the Free Software Foundation.
12 
13  This program is distributed in the hope that it will be useful, but
14  WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  version 3 along with this program. If not, see
20  http://www.gnu.org/licenses/ .
21 
22  */
23 
24 #ifndef OPENMW_COMPONENTS_NIF_RECORD_HPP
25 #define OPENMW_COMPONENTS_NIF_RECORD_HPP
26 
27 #include <string>
28 
29 namespace Nif
30 {
31 
32 class NIFFile;
33 class NIFStream;
34 
36 {
97 };
98 
100 struct Record
101 {
102  // Record type and type name
103  int recType;
104  std::string recName;
105  size_t recIndex;
106 
107  Record() : recType(RC_MISSING), recIndex(~(size_t)0) {}
108 
110  virtual void read(NIFStream *nif) = 0;
111 
113  virtual void post(NIFFile *nif) {}
114 
115  virtual ~Record() {}
116 };
117 
118 } // Namespace
119 #endif
Definition: record.hpp:83
Definition: niffile.hpp:17
virtual void read(NIFStream *nif)=0
Parses the record from file.
Definition: record.hpp:61
Definition: record.hpp:59
Definition: record.hpp:66
Definition: record.hpp:41
Definition: record.hpp:57
Definition: record.hpp:60
Definition: record.hpp:58
Base class for all records.
Definition: record.hpp:100
Definition: record.hpp:70
Definition: record.hpp:89
Definition: record.hpp:71
Definition: record.hpp:79
Definition: record.hpp:91
Definition: record.hpp:62
Definition: record.hpp:95
int recType
Definition: record.hpp:103
Definition: record.hpp:39
Definition: record.hpp:85
Definition: record.hpp:43
Definition: record.hpp:94
Definition: record.hpp:80
Definition: record.hpp:38
Definition: record.hpp:37
RecordType
Definition: record.hpp:35
Definition: record.hpp:63
Definition: record.hpp:53
Definition: record.hpp:96
Definition: record.hpp:55
Definition: record.hpp:64
Definition: record.hpp:90
Definition: record.hpp:45
Definition: record.hpp:52
Definition: record.hpp:81
Definition: record.hpp:72
virtual ~Record()
Definition: record.hpp:115
Definition: record.hpp:56
Definition: record.hpp:93
Record()
Definition: record.hpp:107
Definition: record.hpp:50
Definition: record.hpp:92
Definition: record.hpp:88
Definition: record.hpp:86
Definition: record.hpp:44
Definition: record.hpp:84
Definition: record.hpp:65
Definition: record.hpp:82
Definition: record.hpp:51
Definition: record.hpp:76
Definition: record.hpp:48
Definition: record.hpp:77
Definition: record.hpp:74
Definition: record.hpp:42
Definition: record.hpp:73
std::string recName
Definition: record.hpp:104
Definition: record.hpp:68
Definition: record.hpp:87
Definition: record.hpp:67
Definition: record.hpp:47
Definition: record.hpp:78
Definition: record.hpp:40
Definition: nifstream.hpp:26
virtual void post(NIFFile *nif)
Does post-processing, after the entire tree is loaded.
Definition: record.hpp:113
Definition: record.hpp:54
Definition: record.hpp:49
size_t recIndex
Definition: record.hpp:105
Definition: record.hpp:46
Definition: record.hpp:75
Definition: record.hpp:69