xoreos  0.0.5
erfwriter.h
Go to the documentation of this file.
1 /* xoreos - A reimplementation of BioWare's Aurora engine
2  *
3  * xoreos is the legal property of its developers, whose names
4  * can be found in the AUTHORS file distributed with this source
5  * distribution.
6  *
7  * xoreos is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 3
10  * of the License, or (at your option) any later version.
11  *
12  * xoreos is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with xoreos. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
25 #ifndef AURORA_ERFWRITER_H
26 #define AURORA_ERFWRITER_H
27 
28 #include "src/common/writestream.h"
29 #include "src/common/readstream.h"
30 
31 #include "src/aurora/locstring.h"
32 
33 namespace Aurora {
34 
35 class ERFWriter {
36 public:
37  enum Version {
39 
40  // TODO: Add other versions
41  };
42 
52  ERFWriter(uint32 id, uint32 fileCount, Common::SeekableWriteStream &stream,
53  Version version = kERFVersion10, LocString description = LocString());
54  ~ERFWriter();
55 
57  void add(const Common::UString &resRef, FileType resType, Common::ReadStream &stream);
58 
59 private:
61 
67 };
68 
69 } // End of namespace Aurora
70 
71 #endif // AURORA_ERFWRITER_H
Generic interface for a readable data stream.
Definition: readstream.h:64
A class holding an UTF-8 string.
Definition: ustring.h:48
A localized string.
Definition: locstring.h:43
uint32 _currentFileCount
Definition: erfwriter.h:62
uint32 _resourceTableOffset
Definition: erfwriter.h:66
uint32 _fileCount
Definition: erfwriter.h:63
ERFWriter(uint32 id, uint32 fileCount, Common::SeekableWriteStream &stream, Version version=kERFVersion10, LocString description=LocString())
Create an ERF writer by writing the header to the stream and reserve fileCount places in the key and ...
Definition: erfwriter.cpp:33
Basic writing stream interfaces.
Handling BioWare&#39;s localized strings.
Basic reading stream interfaces.
uint32 _keyTableOffset
Definition: erfwriter.h:65
Common::SeekableWriteStream & _stream
Definition: erfwriter.h:60
uint32_t uint32
Definition: types.h:204
FileType
Various file types used by the Aurora engine and found in archives.
Definition: types.h:56
void add(const Common::UString &resRef, FileType resType, Common::ReadStream &stream)
Add a new stream to this archive to be packed.
Definition: erfwriter.cpp:88
uint32 _offsetToResourceData
Definition: erfwriter.h:64