ScummVM API documentation
file.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 MM_SHARED_XEEN_FILE_H
23#define MM_SHARED_XEEN_FILE_H
24
25#include "common/file.h"
26#include "common/serializer.h"
27
28namespace MM {
29namespace Shared {
30namespace Xeen {
31
32
36class File : public Common::File {
37private:
38public:
39#ifdef ENABLE_XEEN
43 static void setCurrentArchive(int ccMode);
44#endif
45
49 static void syncBitFlags(Common::Serializer &s, bool *startP, bool *endP);
50public:
51 File() : Common::File() {
52 }
53 File(const Common::Path &filename);
54 File(const Common::Path &filename, Common::Archive &archive);
55#ifdef ENABLE_XEEN
56 File(const Common::Path &filename, int ccMode);
57#endif
58 ~File() override {}
59
63 bool open(const Common::Path &filename) override;
64
68 bool open(const Common::Path &filename, Common::Archive &archive) override;
69#ifdef ENABLE_XEEN
73 virtual bool open(const Common::Path &filename, int ccMode);
74#endif
75
79 bool open(const Common::FSNode &node) override {
80 return Common::File::open(node);
81 }
82
86 bool open(SeekableReadStream *stream, const Common::String &name) override {
87 return Common::File::open(stream, name);
88 }
89
94
101 static bool exists(const Common::Path &filename);
102
103#ifdef ENABLE_XEEN
111 static bool exists(const Common::Path &filename, int ccMode);
112#endif
113
121 static bool exists(const Common::Path &filename, Common::Archive &archive);
122};
123
124} // namespace Xeen
125} // namespace Shared
126} // namespace MM
127
128#endif
Definition: archive.h:141
Definition: fs.h:69
Definition: file.h:47
virtual bool open(const Path &filename)
Definition: path.h:52
Definition: serializer.h:80
Definition: str.h:59
Definition: file.h:36
static bool exists(const Common::Path &filename)
bool open(SeekableReadStream *stream, const Common::String &name) override
Definition: file.h:86
bool open(const Common::Path &filename) override
Common::String readString()
bool open(const Common::FSNode &node) override
Definition: file.h:79
static bool exists(const Common::Path &filename, Common::Archive &archive)
static void syncBitFlags(Common::Serializer &s, bool *startP, bool *endP)
bool open(const Common::Path &filename, Common::Archive &archive) override
Definition: algorithm.h:29
Definition: detection.h:27