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 SCUMM_EDITOR_FILE_H
23 #define SCUMM_EDITOR_FILE_H
24 
25 #include "common/noncopyable.h"
26 #include "common/path.h"
27 #include "common/stream.h"
28 
29 namespace Scumm {
30 
31 namespace Editor {
32 
33 class File : public Common::NonCopyable {
34 private:
35  Common::Path _path;
36  byte _encByte;
38 
39 public:
40  File();
41  ~File();
42 
43  bool open(const Common::Path &path, byte encByte);
44  void close();
45 
46  const Common::Path &getPath() const;
47 
48  int64 pos() const;
49  int64 size() const;
50  bool seek(int64 offs, int whence = SEEK_SET);
51  uint32 read(void *dataPtr, uint32 dataSize);
52 
53  byte readByte();
54  uint16 readUint16LE();
55  uint32 readUint32LE();
56  uint16 readUint16BE();
57  uint32 readUint32BE();
58 };
59 
60 } // End of namespace Editor
61 
62 } // End of namespace Scumm
63 
64 #endif
Definition: path.h:52
Definition: stream.h:745
Definition: noncopyable.h:39
Definition: file.h:33
Definition: actor.h:30