GameScript: Move initialization out of constructor.
[gemrb.git] / gemrb / core / CachedFileStream.h
blob694f81f76da0ef4007dc8c83d400aeb1374c2bc4
1 /* GemRB - Infinity Engine Emulator
2 * Copyright (C) 2003 The GemRB Project
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 #ifndef CACHEDFILESTREAM_H
22 #define CACHEDFILESTREAM_H
24 #include "FileStream.h"
25 #include "exports.h"
27 class GEM_EXPORT CachedFileStream : public DataStream// : public FileStream
29 private:
30 bool autoFree;
31 unsigned long startpos;
32 _FILE* str;
33 public:
34 CachedFileStream(const char* stream, bool autoFree = true);
35 CachedFileStream(CachedFileStream* cfs, int startpos, int size,
36 bool autoFree = true);
37 ~CachedFileStream(void);
38 int Read(void* dest, unsigned int length);
39 int Write(const void* src, unsigned int length);
40 int Seek(int pos, int startpos);
41 /** No descriptions */
42 int ReadLine(void* buf, unsigned int maxlen);
44 #endif