TickHook: Fix crash when TickHook isn't set.
[gemrb.git] / gemrb / core / StringMgr.h
blobbe18bd1e300a5e9a3047f1a686ce55236a1fee7b
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 StringMgr.h
23 * Declares StringMgr class, loader for StringBlock objects (.TLK files)
24 * @author The GemRB Project
28 #ifndef STRINGMGR_H
29 #define STRINGMGR_H
31 #include "Plugin.h"
32 #include "System/DataStream.h"
34 /**
35 * @struct StringBlock
36 * Text and its associated sound.
39 struct StringBlock {
40 char* text;
41 ieResRef Sound;
44 /**
45 * @class StringMgr
46 * Abstract loader for StringBlock objects (strings in .TLK files)
49 class GEM_EXPORT StringMgr : public Plugin {
50 public:
51 StringMgr(void);
52 virtual ~StringMgr(void);
53 virtual void OpenAux() = 0;
54 virtual void CloseAux() = 0;
55 virtual bool Open(DataStream* stream, bool autoFree = true) = 0;
56 virtual char* GetString(ieStrRef strref, unsigned int flags = 0) = 0;
57 virtual StringBlock GetStringBlock(ieStrRef strref, unsigned int flags = 0) = 0;
58 virtual void FreeString(char *str) = 0;
59 virtual ieStrRef UpdateString(ieStrRef strref, const char *text) = 0;
62 #endif // ! STRINGMGR_H