Files
MagicSetEditor2/src/data/word_list.hpp
T
twanvl fcc89b64d6 Added support for scripts to determine word lists;
Added 'trim' and 'remove_tags' script functions;
Simplified safety improvements of locale checker;
Added 'is_targeted' function to magic game to replace the contains(..) calls

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@635 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-08-28 18:33:38 +00:00

64 lines
2.0 KiB
C++

//+----------------------------------------------------------------------------+
//| Description: Magic Set Editor - Program to make Magic (tm) cards |
//| Copyright: (C) 2001 - 2007 Twan van Laarhoven |
//| License: GNU General Public License 2 or later (see file COPYING) |
//+----------------------------------------------------------------------------+
#ifndef HEADER_DATA_WORD_LIST
#define HEADER_DATA_WORD_LIST
// ----------------------------------------------------------------------------- : Includes
#include <util/prec.hpp>
#include <util/reflect.hpp>
#include <script/scriptable.hpp>
DECLARE_POINTER_TYPE(WordListWord);
DECLARE_POINTER_TYPE(WordList);
DECLARE_POINTER_TYPE(AutoReplace);
// ----------------------------------------------------------------------------- : WordList
/// A word in a WordList
class WordListWord : public IntrusivePtrBase<WordListWord> {
public:
WordListWord();
String name; ///< Name of the list / the word
bool line_below; ///< Line below in the list?
bool is_prefix; ///< Is this a prefix before other words?
vector<WordListWordP> words; ///< Sublist
OptionalScript script; ///< Generate words using a script
inline bool isGroup() const { return !words.empty(); }
DECLARE_REFLECTION();
};
/// A list of words for a drop down box
class WordList : public WordListWord {
public:
DECLARE_REFLECTION();
};
// ----------------------------------------------------------------------------- : Auto replace words
/// Autoreplace specific shortcut words
class AutoReplace : public IntrusivePtrVirtualBase {
public:
AutoReplace();
bool enabled;
bool whole_word;
bool custom; ///< Is this a custom auto replace?
String match;
String replace;
inline AutoReplaceP clone() const { return new_intrusive1<AutoReplace>(*this); }
DECLARE_REFLECTION();
};
// ----------------------------------------------------------------------------- : EOF
#endif