+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/*
-* Copyright (C) {1999}, International Business Machines Corporation and others. All Rights Reserved.
+**********************************************************************
+* Copyright (C) 1999-2007, International Business Machines Corporation
+* and others. All Rights Reserved.
**********************************************************************
* Date Name Description
* 11/17/99 aliu Creation.
#define RBT_DATA_H
#include "unicode/utypes.h"
+#include "unicode/uclean.h"
#if !UCONFIG_NO_TRANSLITERATION
#include "unicode/uobject.h"
#include "rbt_set.h"
+#include "hash.h"
U_NAMESPACE_BEGIN
class UnicodeFunctor;
-class UnicodeString;
class UnicodeMatcher;
class UnicodeReplacer;
-class Hashtable;
/**
* The rule data for a RuleBasedTransliterators. RBT objects hold
* data structure handles this. See the parsing code for more
* details.
*/
-class U_I18N_API TransliterationRuleData : public UMemory {
+class TransliterationRuleData : public UMemory {
public:
* data.variables. The stand-in also represents the UnicodeMatcher in
* the stored rules.
*/
- Hashtable* variableNames;
+ Hashtable variableNames;
/**
* Map category variable (UChar) to set (UnicodeFunctor).
*/
UnicodeFunctor** variables;
+ /**
+ * Flag that indicates whether the variables are owned (if a single
+ * call to Transliterator::createFromRules() produces a CompoundTransliterator
+ * with more than one RuleBasedTransliterator as children, they all share
+ * the same variables list, so only the first one is considered to own
+ * the variables)
+ */
+ UBool variablesAreOwned;
+
/**
* The character that represents variables[0]. Characters
* variablesBase through variablesBase +
*/
UnicodeReplacer* lookupReplacer(UChar32 standIn) const;
+
private:
TransliterationRuleData &operator=(const TransliterationRuleData &other); // forbid copying of this class
};