Xalan-C++ API Reference  1.12.0
XalanNumberingResourceBundle.hpp
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one
3  * or more contributor license agreements. See the NOTICE file
4  * distributed with this work for additional information
5  * regarding copyright ownership. The ASF licenses this file
6  * to you under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 
19 #if !defined(XALAN_NUMBERINGRESOURCEBUNDLE_HEADER_GUARD)
20 #define XALAN_NUMBERINGRESOURCEBUNDLE_HEADER_GUARD
21 
22 
23 
24 // Base include file. Must be first.
26 
27 
28 
30 
31 
32 
34 
35 
36 
37 namespace XALAN_CPP_NAMESPACE {
38 
40 
42 {
43 public:
44 
45  typedef unsigned long NumberType;
46 
49 
50  // Enum to describe language orientation. (English is left-to-right,
51  // Hebrew is right-to-left, etc.)
52  enum eOrientation { eLeftToRight, eRightToLeft, eTopToBottom, eBottomToTop };
53 
54  // Enum to describe how numbering is done.
55  enum eNumberingMethod { eAdditive, eMultiplicativeAdditive };
56 
57  // Enum to describe the where the multiplier goes.
58  enum eMultiplierOrder { eFollows, ePrecedes };
59 
60 
62  const XalanDOMString& theLanguage,
63  const XalanDOMString& theUILanguage,
64  const XalanDOMString& theHelpLanguage,
65  const XalanDOMCharVectorType& theAlphabet,
66  const XalanDOMCharVectorType& theTraditionalAlphabet,
67  eOrientation theOrientation,
68  eNumberingMethod theNumberingMethod,
69  eMultiplierOrder theMultiplierOrder,
70  NumberType theMaxNumericalValue,
71  const NumberTypeVectorType& theNumberGroups,
72  const NumberTypeVectorType& theMultipliers,
73  const XalanDOMCharVectorType& theZeroChar,
74  const XalanDOMCharVectorType& theMultiplierChars,
75  const DigitsTableVectorType& theDigitsTable,
76  const NumberTypeVectorType& theDigitsTableTable,
77  MemoryManager& theManager);
78 
79  explicit
80  XalanNumberingResourceBundle(MemoryManager& theManager);
81 
83  MemoryManager& theManager);
84 
86 
87  MemoryManager&
89  {
90  return m_language.getMemoryManager();
91  }
92 
93  bool
95  {
96  return equals(m_language, theRHS.m_language);
97  }
98 
99  const XalanDOMString&
100  getLanguage() const
101  {
102  return m_language;
103  }
104 
105  const XalanDOMString&
107  {
108  return m_uiLanguage;
109  }
110 
111  const XalanDOMString&
113  {
114  return m_helpLanguage;
115  }
116 
118  getAlphabet() const
119  {
120  return m_alphabet;
121  }
122 
125  {
126  return m_traditionalAlphabet;
127  }
128 
129  eOrientation
131  {
132  return m_orientation;
133  }
134 
135  eNumberingMethod
137  {
138  return m_numberingMethod;
139  }
140 
141  eMultiplierOrder
143  {
144  return m_multiplierOrder;
145  }
146 
147  NumberType
149  {
150  return m_maxNumericalValue;
151  }
152 
153  const NumberTypeVectorType&
155  {
156  return m_numberGroups;
157  }
158 
159  const NumberTypeVectorType&
161  {
162  return m_multipliers;
163  }
164 
166  getZeroChar() const
167  {
168  return m_zeroChar;
169  }
170 
173  {
174  return m_multiplierChars;
175  }
176 
177  const DigitsTableVectorType&
179  {
180  return m_digitsTable;
181  }
182 
183  const NumberTypeVectorType&
185  {
186  return m_digitsTableTable;
187  }
188 
189  void
191 
192 private:
193 
194  XalanDOMString m_language;
195 
196  XalanDOMString m_uiLanguage;
197 
198  XalanDOMString m_helpLanguage;
199 
200  XalanDOMCharVectorType m_alphabet;
201 
202  XalanDOMCharVectorType m_traditionalAlphabet;
203 
204  eOrientation m_orientation;
205 
206  eNumberingMethod m_numberingMethod;
207 
208  eMultiplierOrder m_multiplierOrder;
209 
210  NumberType m_maxNumericalValue;
211 
212  NumberTypeVectorType m_numberGroups;
213 
214  NumberTypeVectorType m_multipliers;
215 
216  XalanDOMCharVectorType m_zeroChar;
217 
218  XalanDOMCharVectorType m_multiplierChars;
219 
220  DigitsTableVectorType m_digitsTable;
221 
222  NumberTypeVectorType m_digitsTableTable;
223 };
224 
225 
226 
227 }
228 
229 
230 
231 #endif // XALAN_NUMBERINGRESOURCEBUNDLE_HEADER_GUARD
xalanc::XalanNumberingResourceBundle::getDigitsTable
const DigitsTableVectorType & getDigitsTable() const
Definition: XalanNumberingResourceBundle.hpp:178
xalanc::XalanNumberingResourceBundle::getHelpLanguage
const XalanDOMString & getHelpLanguage() const
Definition: XalanNumberingResourceBundle.hpp:112
xalanc::XalanNumberingResourceBundle::getLanguage
const XalanDOMString & getLanguage() const
Definition: XalanNumberingResourceBundle.hpp:100
xalanc::XalanNumberingResourceBundle::getMaxNumericalValue
NumberType getMaxNumericalValue() const
Definition: XalanNumberingResourceBundle.hpp:148
XALAN_CPP_NAMESPACE
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
Definition: XalanVersion.hpp:76
xalanc::XalanNumberingResourceBundle::eOrientation
eOrientation
Definition: XalanNumberingResourceBundle.hpp:52
xalanc::XalanNumberingResourceBundle::getMultiplierChars
const XalanDOMCharVectorType & getMultiplierChars() const
Definition: XalanNumberingResourceBundle.hpp:172
xalanc::XalanVector< NumberType >
XALAN_USES_MEMORY_MANAGER
#define XALAN_USES_MEMORY_MANAGER(Type)
Definition: XalanMemoryManagement.hpp:589
xalanc::XalanNumberingResourceBundle::operator==
bool operator==(const XalanNumberingResourceBundle &theRHS) const
Definition: XalanNumberingResourceBundle.hpp:94
xalanc::swap
void swap(XalanVector< Type > &theLHS, XalanVector< Type > &theRHS)
Definition: XalanVector.hpp:1107
xalanc::XalanNumberingResourceBundle::getMultipliers
const NumberTypeVectorType & getMultipliers() const
Definition: XalanNumberingResourceBundle.hpp:160
xalanc::XalanNumberingResourceBundle::getNumberingMethod
eNumberingMethod getNumberingMethod() const
Definition: XalanNumberingResourceBundle.hpp:136
xalanc::XalanNumberingResourceBundle::getUILanguage
const XalanDOMString & getUILanguage() const
Definition: XalanNumberingResourceBundle.hpp:106
xalanc::XalanNumberingResourceBundle::getAlphabet
const XalanDOMCharVectorType & getAlphabet() const
Definition: XalanNumberingResourceBundle.hpp:118
XalanVector.hpp
xalanc::equals
equals(const XalanDOMChar *theLHS, const XalanDOMChar *theRHS, XalanDOMString::size_type theLength)
Compare the contents of two arrays for equality.
xalanc::XalanNumberingResourceBundle::NumberType
unsigned long NumberType
Definition: XalanNumberingResourceBundle.hpp:45
xalanc::XalanDOMCharVectorType
XalanVector< XalanDOMChar > XalanDOMCharVectorType
Definition: XalanDOMString.hpp:1124
DOMStringHelper.hpp
xalanc::XalanNumberingResourceBundle::getNumberGroups
const NumberTypeVectorType & getNumberGroups() const
Definition: XalanNumberingResourceBundle.hpp:154
xalanc::XalanNumberingResourceBundle::eTopToBottom
@ eTopToBottom
Definition: XalanNumberingResourceBundle.hpp:52
xalanc::XalanNumberingResourceBundle::getTraditionalAlphabet
const XalanDOMCharVectorType & getTraditionalAlphabet() const
Definition: XalanNumberingResourceBundle.hpp:124
xalanc::XalanNumberingResourceBundle::NumberTypeVectorType
XalanVector< NumberType > NumberTypeVectorType
Definition: XalanNumberingResourceBundle.hpp:47
xalanc::XalanNumberingResourceBundle::getOrientation
eOrientation getOrientation() const
Definition: XalanNumberingResourceBundle.hpp:130
xalanc::XalanNumberingResourceBundle
Definition: XalanNumberingResourceBundle.hpp:41
xalanc::XalanNumberingResourceBundle::eMultiplierOrder
eMultiplierOrder
Definition: XalanNumberingResourceBundle.hpp:58
XSLTDefinitions.hpp
xalanc::XalanNumberingResourceBundle::getZeroChar
const XalanDOMCharVectorType & getZeroChar() const
Definition: XalanNumberingResourceBundle.hpp:166
xalanc::XalanNumberingResourceBundle::getMemoryManager
MemoryManager & getMemoryManager()
Definition: XalanNumberingResourceBundle.hpp:88
xalanc::XalanNumberingResourceBundle::eNumberingMethod
eNumberingMethod
Definition: XalanNumberingResourceBundle.hpp:55
xalanc::XalanDOMString
Definition: XalanDOMString.hpp:45
xalanc::XalanNumberingResourceBundle::DigitsTableVectorType
XalanVector< XalanDOMCharVectorType > DigitsTableVectorType
Definition: XalanNumberingResourceBundle.hpp:48
xalanc::XalanNumberingResourceBundle::getDigitsTableTable
const NumberTypeVectorType & getDigitsTableTable() const
Definition: XalanNumberingResourceBundle.hpp:184
xalanc::XalanNumberingResourceBundle::getMultiplierOrder
eMultiplierOrder getMultiplierOrder() const
Definition: XalanNumberingResourceBundle.hpp:142