ScummVM API documentation
tt_vocab.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 TITANIC_ST_VOCAB_H
23 #define TITANIC_ST_VOCAB_H
24 
25 #include "titanic/support/exe_resources.h"
26 #include "titanic/support/string.h"
27 #include "titanic/true_talk/tt_string.h"
28 #include "titanic/true_talk/tt_word.h"
29 
30 namespace Titanic {
31 
32 class TTvocab {
33 private:
34  TTword *_headP;
35  TTword *_tailP;
36  TTword *_word;
37  VocabMode _vocabMode;
38 private:
42  int load(const CString &name);
43 
47  void addWord(TTword *word);
48 
52  TTword *findWord(const TTstring &str);
53 
62  TTword *getPrimeWord(TTstring &str, TTword **srcWord = nullptr) const;
63 
70  TTword *getSuffixedWord(TTstring &str, TTword **srcWord = nullptr) const;
71 
78  TTword *getPrefixedWord(TTstring &str, TTword **srcWord = nullptr) const;
79 public:
80  TTvocab(VocabMode vocabMode);
81  ~TTvocab();
82 
89  TTword *getWord(TTstring &str, TTword **srcWord = nullptr) const;
90 };
91 
92 } // End of namespace Titanic
93 
94 #endif /* TITANIC_ST_VOCAB_H */
Definition: tt_vocab.h:32
TTword * getWord(TTstring &str, TTword **srcWord=nullptr) const
Definition: arm.h:30
Definition: string.h:40
Definition: tt_string.h:45
Definition: tt_word.h:41