xoreos  0.0.5
talktable.h
Go to the documentation of this file.
1 /* xoreos - A reimplementation of BioWare's Aurora engine
2  *
3  * xoreos is the legal property of its developers, whose names
4  * can be found in the AUTHORS file distributed with this source
5  * distribution.
6  *
7  * xoreos is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 3
10  * of the License, or (at your option) any later version.
11  *
12  * xoreos 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 xoreos. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
25 #ifndef AURORA_TALKTABLE_H
26 #define AURORA_TALKTABLE_H
27 
28 #include <boost/noncopyable.hpp>
29 
30 #include "src/common/types.h"
31 #include "src/common/encoding.h"
32 
33 namespace Common {
34  class UString;
35  class SeekableReadStream;
36 }
37 
38 namespace Aurora {
39 
52 class TalkTable : boost::noncopyable {
53 public:
54  virtual ~TalkTable();
55 
56  virtual bool hasEntry(uint32 strRef) const = 0;
57 
58  virtual const Common::UString &getString (uint32 strRef) const = 0;
59  virtual const Common::UString &getSoundResRef(uint32 strRef) const = 0;
60 
61  virtual uint32 getSoundID(uint32 strRef) const = 0;
62 
65 
66 
67 protected:
68  TalkTable(Common::Encoding encoding);
69 
71 };
72 
73 } // End of namespace Aurora
74 
75 #endif // AURORA_TALKTABLE_H
virtual uint32 getSoundID(uint32 strRef) const =0
virtual ~TalkTable()
Definition: talktable.cpp:42
Definition: 2dafile.h:39
A class holding an UTF-8 string.
Definition: ustring.h:48
Base class for BioWare&#39;s talk tables.
Definition: talktable.h:52
virtual const Common::UString & getString(uint32 strRef) const =0
virtual const Common::UString & getSoundResRef(uint32 strRef) const =0
static TalkTable * load(Common::SeekableReadStream *tlk, Common::Encoding encoding)
Take over this stream and read a talk table (of either format) out of it.
Definition: talktable.cpp:45
virtual bool hasEntry(uint32 strRef) const =0
Common::Encoding _encoding
Definition: talktable.h:70
Utility functions for working with differing string encodings.
Encoding
Definition: encoding.h:37
Low-level type definitions to handle fixed width types portably.
TalkTable(Common::Encoding encoding)
Definition: talktable.cpp:39
uint32_t uint32
Definition: types.h:204
Interface for a seekable & readable data stream.
Definition: readstream.h:265