ScummVM API documentation
raw_archive.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22#ifndef ULTIMA8_FILESYS_RAWARCHIVE_H
23#define ULTIMA8_FILESYS_RAWARCHIVE_H
24
25#include "ultima/ultima8/filesys/archive.h"
26
27namespace Ultima {
28namespace Ultima8 {
29
30class ArchiveFile;
31class IDataSource;
32
33class RawArchive : public Archive {
34public:
35 RawArchive() : Archive() { }
36 explicit RawArchive(Common::SeekableReadStream *rs) : Archive(rs) { }
37
38 ~RawArchive() override;
39
40 void cache(uint32 index) override;
41 void uncache(uint32 index) override;
42 bool isCached(uint32 index) const override;
43
45 virtual const uint8 *get_object_nodel(uint32 index);
46
48 virtual uint8 *get_object(uint32 index);
49
51 virtual uint32 get_size(uint32 index) const;
52
56
57protected:
59};
60
61} // End of namespace Ultima8
62} // End of namespace Ultima
63
64#endif
Definition: stream.h:745
Definition: archive.h:37
Archive()
create Archive without any input sources
Definition: raw_archive.h:33
virtual uint32 get_size(uint32 index) const
get size of object
virtual uint8 * get_object(uint32 index)
return object. delete afterwards. This will not cache the object
virtual const uint8 * get_object_nodel(uint32 index)
return object. DON'T delete or modify!
void uncache(uint32 index) override
bool isCached(uint32 index) const override
Check if an object is cached.
virtual Common::SeekableReadStream * get_datasource(uint32 index)
void cache(uint32 index) override
Cache a single object.