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 #if !defined(XALANDECIMALFORMATSYMBOLS_HEADER_GUARD_1357924680) 00019 #define XALANDECIMALFORMATSYMBOLS_HEADER_GUARD_1357924680 00020 00021 00022 00023 // Base include file. Must be first. 00024 #include <xalanc/PlatformSupport/PlatformSupportDefinitions.hpp> 00025 00026 00027 00028 #include <cassert> 00029 00030 00031 00032 #include <xalanc/XalanDOM/XalanDOMString.hpp> 00033 00034 00035 00036 XALAN_CPP_NAMESPACE_BEGIN 00037 00038 00039 00040 class XALAN_PLATFORMSUPPORT_EXPORT XalanDecimalFormatSymbols 00041 { 00042 public: 00043 00044 // Eventually, this constructor should take a locale to determine 00045 // all of the stuff it needs to know. But locales are implemented 00046 // on all of our platforms yet. 00047 explicit 00048 XalanDecimalFormatSymbols(MemoryManager& theManager); 00049 00050 XalanDecimalFormatSymbols(const XalanDecimalFormatSymbols& theSource, 00051 MemoryManager& theManager); 00052 00053 ~XalanDecimalFormatSymbols(); 00054 00055 XalanDecimalFormatSymbols& 00056 operator=(const XalanDecimalFormatSymbols& theRHS); 00057 00058 /** 00059 * Retrieve the string denoting the local currency, "$", for example 00060 * 00061 * @return string used for local currency 00062 */ 00063 const XalanDOMString& 00064 getCurrencySymbol() const 00065 { 00066 return m_currencySymbol; 00067 } 00068 00069 /** 00070 * Retrieve the character used for decimal sign, '.' for example 00071 * 00072 * @return character used for decimal sign 00073 */ 00074 XalanDOMChar 00075 getDecimalSeparator() const 00076 { 00077 return m_decimalSeparator; 00078 } 00079 00080 /** 00081 * Retrieve character used for a digit in a pattern 00082 * 00083 * @return character used for a digit in a pattern 00084 */ 00085 XalanDOMChar 00086 getDigit() const 00087 { 00088 return m_digit; 00089 } 00090 00091 /** 00092 * Retrieve the character used for thousands separator, "," for example 00093 * 00094 * @return character used for thousands separator 00095 */ 00096 XalanDOMChar 00097 getGroupingSeparator() const 00098 { 00099 return m_groupingSeparator; 00100 } 00101 00102 /** 00103 * Retrieve the string used to represent infinity 00104 * 00105 * @return string used to represent infinity 00106 */ 00107 const XalanDOMString& 00108 getInfinity() const 00109 { 00110 return m_infinity; 00111 } 00112 00113 /** 00114 * Retrieve the international string denoting the local currency 00115 * 00116 * @return international string denoting the local currency 00117 */ 00118 const XalanDOMString& 00119 getInternationalCurrencySymbol() const 00120 { 00121 return m_internationalCurrencySymbol; 00122 } 00123 00124 /** 00125 * Retrieve the character used to represent minus sign 00126 * 00127 * @return character used to represent minus sign 00128 */ 00129 XalanDOMChar 00130 getMinusSign() const 00131 { 00132 return m_minusSign; 00133 } 00134 00135 /** 00136 * Retrieve the monetary decimal separator 00137 * 00138 * @return character used to separate decimal portion of currency 00139 */ 00140 XalanDOMChar 00141 getMonetaryDecimalSeparator() const 00142 { 00143 return m_monetaryDecimalSeparator; 00144 } 00145 00146 /** 00147 * Retrieve the string used for a numeric value that cannot be represented 00148 * as a number 00149 * 00150 * @return string representing "not a number" value 00151 */ 00152 const XalanDOMString& 00153 getNaN() const 00154 { 00155 return m_NaN; 00156 } 00157 00158 /** 00159 * Retrieve the character used to separate positive and negative 00160 * subpatterns in a pattern 00161 * 00162 * @return character used to separate positive and negative subpatterns 00163 */ 00164 XalanDOMChar 00165 getPatternSeparator() const 00166 { 00167 return m_patternSeparator; 00168 } 00169 00170 /** 00171 * Retrieve the character used for percent sign, "%," for example 00172 * 00173 * @return character used for percent sign 00174 */ 00175 XalanDOMChar 00176 getPercent() const 00177 { 00178 return m_percent; 00179 } 00180 00181 /** 00182 * Retrieve the character used for per thousand sign 00183 * 00184 * @return character used for per thousand sign 00185 */ 00186 XalanDOMChar 00187 getPerMill() const 00188 { 00189 return m_perMill; 00190 } 00191 00192 /** 00193 * Retrieve the character used for zero 00194 * 00195 * @return character used for zero 00196 */ 00197 XalanDOMChar 00198 getZeroDigit() const 00199 { 00200 return m_zeroDigit; 00201 } 00202 00203 /** 00204 * Sets the string denoting the local currency, "$", for example 00205 * 00206 * @param theCurrencySymbol symbol used for local currency 00207 */ 00208 void 00209 setCurrencySymbol(const XalanDOMString& theCurrencySymbol) 00210 { 00211 m_currencySymbol = theCurrencySymbol; 00212 } 00213 00214 /** 00215 * Sets the string denoting the local currency, "$", for example 00216 * 00217 * @param theCurrencySymbol symbol used for local currency 00218 */ 00219 void 00220 setCurrencySymbol(const XalanDOMChar* theCurrencySymbol) 00221 { 00222 assert(theCurrencySymbol != 0); 00223 00224 m_currencySymbol = theCurrencySymbol; 00225 } 00226 00227 /** 00228 * Sets the character used for decimal sign, '.' for example 00229 * 00230 * @param theDecimalSeparator character used for decimal sign 00231 */ 00232 void 00233 setDecimalSeparator(XalanDOMChar theDecimalSeparator) 00234 { 00235 m_decimalSeparator = theDecimalSeparator; 00236 } 00237 00238 /** 00239 * Sets the character used for a digit in a pattern 00240 * 00241 * @param theDigit character used for a digit in a pattern 00242 */ 00243 void 00244 setDigit(XalanDOMChar theDigit) 00245 { 00246 m_digit = theDigit; 00247 } 00248 00249 /** 00250 * Sets the character used for thousands separator, "," for example 00251 * 00252 * @param theGroupingSeparator character used for thousands separator 00253 */ 00254 void 00255 setGroupingSeparator(XalanDOMChar theGroupingSeparator) 00256 { 00257 m_groupingSeparator = theGroupingSeparator; 00258 } 00259 00260 /** 00261 * Sets the string used to represent infinity 00262 * 00263 * @param theInfinity string used to represent infinity 00264 */ 00265 void 00266 setInfinity(const XalanDOMString& theInfinity) 00267 { 00268 m_infinity = theInfinity; 00269 } 00270 00271 /** 00272 * Sets the string used to represent infinity 00273 * 00274 * @param theInfinity string used to represent infinity 00275 */ 00276 void 00277 setInfinity(const XalanDOMChar* theInfinity) 00278 { 00279 assert(theInfinity != 0); 00280 00281 m_infinity = theInfinity; 00282 } 00283 00284 /** 00285 * Sets the international string denoting the local currency 00286 * 00287 * @param theInternationalCurrencySymbol international string denoting the 00288 * local currency 00289 */ 00290 void 00291 setInternationalCurrencySymbol(const XalanDOMString& theInternationalCurrencySymbol) 00292 { 00293 m_internationalCurrencySymbol = theInternationalCurrencySymbol; 00294 } 00295 00296 /** 00297 * Sets the international string denoting the local currency 00298 * 00299 * @param theInternationalCurrencySymbol international string denoting the 00300 * local currency 00301 */ 00302 void 00303 setInternationalCurrencySymbol(const XalanDOMChar* theInternationalCurrencySymbol) 00304 { 00305 assert(theInternationalCurrencySymbol != 0); 00306 00307 m_internationalCurrencySymbol = theInternationalCurrencySymbol; 00308 } 00309 00310 /** 00311 * Sets the character used to represent minus sign 00312 * 00313 * @param theMinusSign character used to represent minus sign 00314 */ 00315 void 00316 setMinusSign(XalanDOMChar theMinusSign) 00317 { 00318 m_minusSign = theMinusSign; 00319 } 00320 00321 /** 00322 * Sets the monetary decimal separator 00323 * 00324 * @param theMonetaryDecimalSeparator character used to separate decimal 00325 * portion of currency 00326 */ 00327 void 00328 setMonetaryDecimalSeparator(XalanDOMChar theMonetaryDecimalSeparator) 00329 { 00330 m_monetaryDecimalSeparator = theMonetaryDecimalSeparator; 00331 } 00332 00333 /** 00334 * Sets the string used for a numeric value that cannot be represented 00335 * as a number 00336 * 00337 * @param theNaN string representing "not a number" value 00338 */ 00339 void 00340 setNaN(const XalanDOMString& theNaN) 00341 { 00342 m_NaN = theNaN; 00343 } 00344 00345 /** 00346 * Sets the string used for a numeric value that cannot be represented 00347 * as a number 00348 * 00349 * @param theNaN string representing "not a number" value 00350 */ 00351 void 00352 setNaN(const XalanDOMChar* theNaN) 00353 { 00354 assert(theNaN != 0); 00355 00356 m_NaN = theNaN; 00357 } 00358 00359 /** 00360 * Sets the character used to separate positive and negative subpatterns in 00361 * a pattern 00362 * 00363 * @param thePatternSeparator character used to separate positive and 00364 * negative subpatterns 00365 */ 00366 void 00367 setPatternSeparator(XalanDOMChar thePatternSeparator) 00368 { 00369 m_patternSeparator = thePatternSeparator; 00370 } 00371 00372 /** 00373 * Sets the character used for percent sign, "%," for example 00374 * 00375 * @param thePercent character used for percent sign 00376 */ 00377 void 00378 setPercent(XalanDOMChar thePercent) 00379 { 00380 m_percent = thePercent; 00381 } 00382 00383 /** 00384 * Sets the character used for per thousand sign 00385 * 00386 * @param thePerMill character used for per thousand sign 00387 */ 00388 void 00389 setPerMill(XalanDOMChar thePerMill) 00390 { 00391 m_perMill = thePerMill; 00392 } 00393 00394 /** 00395 * Sets the character used for zero 00396 * 00397 * @param theZeroDigit character used for zero 00398 */ 00399 void 00400 setZeroDigit(XalanDOMChar theZeroDigit) 00401 { 00402 m_zeroDigit = theZeroDigit; 00403 } 00404 00405 bool 00406 operator==(const XalanDecimalFormatSymbols& theRHS) const; 00407 00408 bool 00409 operator!=(const XalanDecimalFormatSymbols& theRHS) const 00410 { 00411 return !operator==(theRHS); 00412 } 00413 00414 private: 00415 // not implemented 00416 XalanDecimalFormatSymbols(); 00417 XalanDecimalFormatSymbols(const XalanDecimalFormatSymbols&); 00418 00419 XalanDOMString m_currencySymbol; 00420 00421 XalanDOMChar m_decimalSeparator; 00422 XalanDOMChar m_digit; 00423 XalanDOMChar m_groupingSeparator; 00424 00425 XalanDOMString m_infinity; 00426 XalanDOMString m_internationalCurrencySymbol; 00427 00428 XalanDOMChar m_minusSign; 00429 XalanDOMChar m_monetaryDecimalSeparator; 00430 00431 XalanDOMString m_NaN; 00432 00433 XalanDOMChar m_patternSeparator; 00434 XalanDOMChar m_percent; 00435 XalanDOMChar m_perMill; 00436 XalanDOMChar m_zeroDigit; 00437 }; 00438 00439 00440 00441 XALAN_CPP_NAMESPACE_END 00442 00443 00444 00445 #endif // XALANDECIMALFORMATSYMBOLS_HEADER_GUARD_1357924680
Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.
Xalan-C++ XSLT Processor Version 1.11 |
|