diff options
author | Roberto C. Sanchez <roberto@connexer.com> | 2014-03-29 10:53:33 -0400 |
---|---|---|
committer | Roberto C. Sanchez <roberto@connexer.com> | 2014-03-29 10:53:33 -0400 |
commit | 8d3fc864d094eeadc721f8e93436b37a5fab173e (patch) | |
tree | 05e201c67dca55b4ccdf90ad479a25d95e3b1e63 /include/utf8transliterator.h |
Imported Upstream version 1.5.3
Diffstat (limited to 'include/utf8transliterator.h')
-rw-r--r-- | include/utf8transliterator.h | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/include/utf8transliterator.h b/include/utf8transliterator.h new file mode 100644 index 0000000..b28d699 --- /dev/null +++ b/include/utf8transliterator.h @@ -0,0 +1,73 @@ +/* + * + * Copyright 2001 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation version 2. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + */ +#ifdef _ICU_ + +#ifndef UTF8TRANSLITERATOR_H +#define UTF8TRANSLITERATOR_H + +enum scriptEnum {SE_OFF, SE_LATIN, /*one-way (to) transliterators*/ SE_BASICLATIN, SE_BETA, SE_BGREEK, /*two-way transliterators*/ SE_GREEK, SE_HEBREW, SE_CYRILLIC, SE_ARABIC, SE_SYRIAC, SE_KATAKANA, SE_HIRAGANA, SE_JAMO, SE_HANGUL, SE_DEVANAGARI, SE_TAMIL, SE_BENGALI, SE_GURMUKHI, SE_GUJARATI, SE_ORIYA, SE_TELUGU, SE_KANNADA, SE_MALAYALAM, SE_THAI, SE_GEORGIAN, SE_ARMENIAN, SE_ETHIOPIC, SE_GOTHIC, SE_UGARITIC, SE_COPTIC, /*one-way (from) transliterators*/ SE_HAN, SE_KANJI}; +#define NUMSCRIPTS 32 +#define NUMTARGETSCRIPTS 5 + +#include <swfilter.h> +#include <swmodule.h> + +#include <unicode/utypes.h> +#include <unicode/ucnv.h> +#include <unicode/ustring.h> +#include <unicode/uchar.h> + +#include <unicode/unistr.h> +#include <unicode/translit.h> + +#include <defs.h> + + /** This Filter shows/hides strong's numbers in a GBF text + */ +class SWDLLEXPORT UTF8Transliterator : public SWFilter +{ + char option; + + static const char optionstring[NUMTARGETSCRIPTS][16]; + + static const char optName[]; + static const char optTip[]; + OptionsList options; + + public: + UTF8Transliterator (); + virtual char ProcessText (char *text, int maxlen, const SWKey * key, const SWModule * = 0); + virtual const char *getOptionName () + { + return optName; + } + virtual const char *getOptionTip () + { + return optTip; + } + virtual void setOptionValue (const char *ival); + virtual const char *getOptionValue (); + virtual OptionsList getOptionValues () + { + return options; + } +}; + +#endif + +#endif |