00001 /* 00002 * Licensed to the Apache Software Foundation (ASF) under one 00003 * or more contributor license agreements. See the NOTICE file 00004 * distributed with this work for additional information 00005 * regarding copyright ownership. The ASF licenses this file 00006 * to you under the Apache License, Version 2.0 (the "License"); 00007 * you may not use this file except in compliance with the License. 00008 * You may obtain a copy of the License at 00009 * 00010 * http://www.apache.org/licenses/LICENSE-2.0 00011 * 00012 * Unless required by applicable law or agreed to in writing, software 00013 * distributed under the License is distributed on an "AS IS" BASIS, 00014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00015 * See the License for the specific language governing permissions and 00016 * limitations under the License. 00017 */ 00018 00019 #if !defined(XALAN_NUMBERINGRESOURCEBUNDLE_HEADER_GUARD) 00020 #define XALAN_NUMBERINGRESOURCEBUNDLE_HEADER_GUARD 00021 00022 00023 00024 // Base include file. Must be first. 00025 #include <xalanc/XSLT/XSLTDefinitions.hpp> 00026 00027 00028 00029 #include <xalanc/Include/XalanVector.hpp> 00030 00031 00032 00033 #include <xalanc/PlatformSupport/DOMStringHelper.hpp> 00034 00035 00036 00037 XALAN_CPP_NAMESPACE_BEGIN 00038 00039 XALAN_USES_MEMORY_MANAGER(XalanDOMCharVectorType) 00040 00041 class XalanNumberingResourceBundle 00042 { 00043 public: 00044 00045 typedef unsigned long NumberType; 00046 00047 typedef XalanVector<NumberType> NumberTypeVectorType; 00048 typedef XalanVector<XalanDOMCharVectorType> DigitsTableVectorType; 00049 00050 // Enum to describe language orientation. (English is left-to-right, 00051 // Hebrew is right-to-left, etc.) 00052 enum eOrientation { eLeftToRight, eRightToLeft, eTopToBottom, eBottomToTop }; 00053 00054 // Enum to describe how numbering is done. 00055 enum eNumberingMethod { eAdditive, eMultiplicativeAdditive }; 00056 00057 // Enum to describe the where the multiplier goes. 00058 enum eMultiplierOrder { eFollows, ePrecedes }; 00059 00060 00061 XalanNumberingResourceBundle( 00062 const XalanDOMString& theLanguage, 00063 const XalanDOMString& theUILanguage, 00064 const XalanDOMString& theHelpLanguage, 00065 const XalanDOMCharVectorType& theAlphabet, 00066 const XalanDOMCharVectorType& theTraditionalAlphabet, 00067 eOrientation theOrientation, 00068 eNumberingMethod theNumberingMethod, 00069 eMultiplierOrder theMultiplierOrder, 00070 NumberType theMaxNumericalValue, 00071 const NumberTypeVectorType& theNumberGroups, 00072 const NumberTypeVectorType& theMultipliers, 00073 const XalanDOMCharVectorType& theZeroChar, 00074 const XalanDOMCharVectorType& theMultiplierChars, 00075 const DigitsTableVectorType& theDigitsTable, 00076 const NumberTypeVectorType& theDigitsTableTable, 00077 MemoryManager& theManager); 00078 00079 explicit 00080 XalanNumberingResourceBundle(MemoryManager& theManager); 00081 00082 XalanNumberingResourceBundle(const XalanNumberingResourceBundle& theSource, 00083 MemoryManager& theManager); 00084 00085 ~XalanNumberingResourceBundle(); 00086 00087 MemoryManager& 00088 getMemoryManager() 00089 { 00090 return m_language.getMemoryManager(); 00091 } 00092 00093 bool 00094 operator==(const XalanNumberingResourceBundle& theRHS) const 00095 { 00096 return equals(m_language, theRHS.m_language); 00097 } 00098 00099 const XalanDOMString& 00100 getLanguage() const 00101 { 00102 return m_language; 00103 } 00104 00105 const XalanDOMString& 00106 getUILanguage() const 00107 { 00108 return m_uiLanguage; 00109 } 00110 00111 const XalanDOMString& 00112 getHelpLanguage() const 00113 { 00114 return m_helpLanguage; 00115 } 00116 00117 const XalanDOMCharVectorType& 00118 getAlphabet() const 00119 { 00120 return m_alphabet; 00121 } 00122 00123 const XalanDOMCharVectorType& 00124 getTraditionalAlphabet() const 00125 { 00126 return m_traditionalAlphabet; 00127 } 00128 00129 eOrientation 00130 getOrientation() const 00131 { 00132 return m_orientation; 00133 } 00134 00135 eNumberingMethod 00136 getNumberingMethod() const 00137 { 00138 return m_numberingMethod; 00139 } 00140 00141 eMultiplierOrder 00142 getMultiplierOrder() const 00143 { 00144 return m_multiplierOrder; 00145 } 00146 00147 NumberType 00148 getMaxNumericalValue() const 00149 { 00150 return m_maxNumericalValue; 00151 } 00152 00153 const NumberTypeVectorType& 00154 getNumberGroups() const 00155 { 00156 return m_numberGroups; 00157 } 00158 00159 const NumberTypeVectorType& 00160 getMultipliers() const 00161 { 00162 return m_multipliers; 00163 } 00164 00165 const XalanDOMCharVectorType& 00166 getZeroChar() const 00167 { 00168 return m_zeroChar; 00169 } 00170 00171 const XalanDOMCharVectorType& 00172 getMultiplierChars() const 00173 { 00174 return m_multiplierChars; 00175 } 00176 00177 const DigitsTableVectorType& 00178 getDigitsTable() const 00179 { 00180 return m_digitsTable; 00181 } 00182 00183 const NumberTypeVectorType& 00184 getDigitsTableTable() const 00185 { 00186 return m_digitsTableTable; 00187 } 00188 00189 void 00190 swap(XalanNumberingResourceBundle& theOther); 00191 00192 private: 00193 00194 XalanDOMString m_language; 00195 00196 XalanDOMString m_uiLanguage; 00197 00198 XalanDOMString m_helpLanguage; 00199 00200 XalanDOMCharVectorType m_alphabet; 00201 00202 XalanDOMCharVectorType m_traditionalAlphabet; 00203 00204 eOrientation m_orientation; 00205 00206 eNumberingMethod m_numberingMethod; 00207 00208 eMultiplierOrder m_multiplierOrder; 00209 00210 NumberType m_maxNumericalValue; 00211 00212 NumberTypeVectorType m_numberGroups; 00213 00214 NumberTypeVectorType m_multipliers; 00215 00216 XalanDOMCharVectorType m_zeroChar; 00217 00218 XalanDOMCharVectorType m_multiplierChars; 00219 00220 DigitsTableVectorType m_digitsTable; 00221 00222 NumberTypeVectorType m_digitsTableTable; 00223 }; 00224 00225 00226 00227 XALAN_CPP_NAMESPACE_END 00228 00229 00230 00231 #endif // XALAN_NUMBERINGRESOURCEBUNDLE_HEADER_GUARD
Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.
Xalan-C++ XSLT Processor Version 1.11 |
|