xoreos  0.0.5
thewitchersavefile.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_THEWITCHERSAVEFILE_H
26 #define AURORA_THEWITCHERSAVEFILE_H
27 
28 #include "src/common/readstream.h"
29 
30 #include "src/aurora/archive.h"
31 
32 namespace Aurora {
33 
42 class TheWitcherSaveFile : public Archive {
43 public:
45 
47  const Common::UString &getAreaName() const;
48 
50  const ResourceList &getResources() const;
51 
53  uint32 getResourceSize(uint32 index) const;
54 
56  Common::SeekableReadStream *getResource(uint32 index, bool tryNoCopy = false) const;
57 
58 private:
59  void load();
60 
61  struct IResource {
64  };
65 
67 
69 
71  std::vector<IResource> _resources;
72 };
73 
74 } // End of namespace Aurora
75 
76 #endif // AURORA_THEWITCHERSAVEFILE_H
const Common::UString & getAreaName() const
Get the area name of this save file.
A class holding an UTF-8 string.
Definition: ustring.h:48
Class for reading and managing TheWitcherSave files.
Handling various archive files.
const ResourceList & getResources() const
Return the list of resources.
std::list< Resource > ResourceList
Definition: archive.h:57
uint32 getResourceSize(uint32 index) const
Get the resource size.
Basic reading stream interfaces.
TheWitcherSaveFile(Common::SeekableReadStream *tws)
Common::SeekableReadStream * getResource(uint32 index, bool tryNoCopy=false) const
Return a stream of the resource&#39;s contents.
uint32_t uint32
Definition: types.h:204
Common::ScopedPtr< Common::SeekableReadStream > _tws
An abstract file archive.
Definition: archive.h:45
Interface for a seekable & readable data stream.
Definition: readstream.h:265
std::vector< IResource > _resources