GameScript: Move initialization out of constructor.
[gemrb.git] / gemrb / core / Resource.h
blobdf0499d361744a9f237ce219ce774fb24ba7ca5c
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 /**
22 * @file Resource.h
23 * Declares Resource class, base class for all resources
24 * @author The GemRB Project
27 #ifndef RESOURCE_H
28 #define RESOURCE_H
30 #include <cstddef>
31 #include "Plugin.h"
33 class DataStream;
35 /**
36 * Base class for all GemRB resources
39 class GEM_EXPORT Resource : public Plugin {
40 protected:
41 DataStream* str;
42 public:
43 Resource();
44 virtual ~Resource();
45 /**
46 * Reads the resource from the given stream.
48 * This should only be called once for a given resource object.
49 * @param[in] stream Non-NULL Stream containg the resource
50 * @retval true stream contains the given resource.
51 * @retval false stream does not contain valid resource.
53 virtual bool Open(DataStream* stream) = 0;
56 #endif