Xalan-C++ API Reference 1.12.0
XalanDecimalFormatSymbols.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#if !defined(XALANDECIMALFORMATSYMBOLS_HEADER_GUARD_1357924680)
19#define XALANDECIMALFORMATSYMBOLS_HEADER_GUARD_1357924680
20
21
22
23// Base include file. Must be first.
25
26
27
28#include <cassert>
29
30
31
33
34
35
36namespace XALAN_CPP_NAMESPACE {
37
38
39
41{
42public:
43
44 // Eventually, this constructor should take a locale to determine
45 // all of the stuff it needs to know. But locales are implemented
46 // on all of our platforms yet.
47 explicit
49
51 MemoryManager& theManager);
52
54
57
58 /**
59 * Retrieve the string denoting the local currency, "$", for example
60 *
61 * @return string used for local currency
62 */
63 const XalanDOMString&
65 {
66 return m_currencySymbol;
67 }
68
69 /**
70 * Retrieve the character used for decimal sign, '.' for example
71 *
72 * @return character used for decimal sign
73 */
76 {
77 return m_decimalSeparator;
78 }
79
80 /**
81 * Retrieve character used for a digit in a pattern
82 *
83 * @return character used for a digit in a pattern
84 */
86 getDigit() const
87 {
88 return m_digit;
89 }
90
91 /**
92 * Retrieve the character used for thousands separator, "," for example
93 *
94 * @return character used for thousands separator
95 */
98 {
99 return m_groupingSeparator;
100 }
101
102 /**
103 * Retrieve the string used to represent infinity
104 *
105 * @return string used to represent infinity
106 */
107 const XalanDOMString&
109 {
110 return m_infinity;
111 }
112
113 /**
114 * Retrieve the international string denoting the local currency
115 *
116 * @return international string denoting the local currency
117 */
118 const XalanDOMString&
120 {
121 return m_internationalCurrencySymbol;
122 }
123
124 /**
125 * Retrieve the character used to represent minus sign
126 *
127 * @return character used to represent minus sign
128 */
131 {
132 return m_minusSign;
133 }
134
135 /**
136 * Retrieve the monetary decimal separator
137 *
138 * @return character used to separate decimal portion of currency
139 */
142 {
143 return m_monetaryDecimalSeparator;
144 }
145
146 /**
147 * Retrieve the string used for a numeric value that cannot be represented
148 * as a number
149 *
150 * @return string representing "not a number" value
151 */
152 const XalanDOMString&
153 getNaN() const
154 {
155 return m_NaN;
156 }
157
158 /**
159 * Retrieve the character used to separate positive and negative
160 * subpatterns in a pattern
161 *
162 * @return character used to separate positive and negative subpatterns
163 */
166 {
167 return m_patternSeparator;
168 }
169
170 /**
171 * Retrieve the character used for percent sign, "%," for example
172 *
173 * @return character used for percent sign
174 */
177 {
178 return m_percent;
179 }
180
181 /**
182 * Retrieve the character used for per thousand sign
183 *
184 * @return character used for per thousand sign
185 */
188 {
189 return m_perMill;
190 }
191
192 /**
193 * Retrieve the character used for zero
194 *
195 * @return character used for zero
196 */
199 {
200 return m_zeroDigit;
201 }
202
203 /**
204 * Sets the string denoting the local currency, "$", for example
205 *
206 * @param theCurrencySymbol symbol used for local currency
207 */
208 void
210 {
211 m_currencySymbol = theCurrencySymbol;
212 }
213
214 /**
215 * Sets the string denoting the local currency, "$", for example
216 *
217 * @param theCurrencySymbol symbol used for local currency
218 */
219 void
221 {
223
224 m_currencySymbol = theCurrencySymbol;
225 }
226
227 /**
228 * Sets the character used for decimal sign, '.' for example
229 *
230 * @param theDecimalSeparator character used for decimal sign
231 */
232 void
237
238 /**
239 * Sets the character used for a digit in a pattern
240 *
241 * @param theDigit character used for a digit in a pattern
242 */
243 void
245 {
246 m_digit = theDigit;
247 }
248
249 /**
250 * Sets the character used for thousands separator, "," for example
251 *
252 * @param theGroupingSeparator character used for thousands separator
253 */
254 void
259
260 /**
261 * Sets the string used to represent infinity
262 *
263 * @param theInfinity string used to represent infinity
264 */
265 void
267 {
268 m_infinity = theInfinity;
269 }
270
271 /**
272 * Sets the string used to represent infinity
273 *
274 * @param theInfinity string used to represent infinity
275 */
276 void
278 {
279 assert(theInfinity != 0);
280
281 m_infinity = theInfinity;
282 }
283
284 /**
285 * Sets the international string denoting the local currency
286 *
287 * @param theInternationalCurrencySymbol international string denoting the
288 * local currency
289 */
290 void
295
296 /**
297 * Sets the international string denoting the local currency
298 *
299 * @param theInternationalCurrencySymbol international string denoting the
300 * local currency
301 */
302 void
309
310 /**
311 * Sets the character used to represent minus sign
312 *
313 * @param theMinusSign character used to represent minus sign
314 */
315 void
317 {
318 m_minusSign = theMinusSign;
319 }
320
321 /**
322 * Sets the monetary decimal separator
323 *
324 * @param theMonetaryDecimalSeparator character used to separate decimal
325 * portion of currency
326 */
327 void
332
333 /**
334 * Sets the string used for a numeric value that cannot be represented
335 * as a number
336 *
337 * @param theNaN string representing "not a number" value
338 */
339 void
341 {
342 m_NaN = theNaN;
343 }
344
345 /**
346 * Sets the string used for a numeric value that cannot be represented
347 * as a number
348 *
349 * @param theNaN string representing "not a number" value
350 */
351 void
353 {
354 assert(theNaN != 0);
355
356 m_NaN = theNaN;
357 }
358
359 /**
360 * Sets the character used to separate positive and negative subpatterns in
361 * a pattern
362 *
363 * @param thePatternSeparator character used to separate positive and
364 * negative subpatterns
365 */
366 void
371
372 /**
373 * Sets the character used for percent sign, "%," for example
374 *
375 * @param thePercent character used for percent sign
376 */
377 void
379 {
380 m_percent = thePercent;
381 }
382
383 /**
384 * Sets the character used for per thousand sign
385 *
386 * @param thePerMill character used for per thousand sign
387 */
388 void
390 {
391 m_perMill = thePerMill;
392 }
393
394 /**
395 * Sets the character used for zero
396 *
397 * @param theZeroDigit character used for zero
398 */
399 void
401 {
402 m_zeroDigit = theZeroDigit;
403 }
404
405 bool
407
408 bool
410 {
411 return !operator==(theRHS);
412 }
413
414private:
415 // not implemented
418
419 XalanDOMString m_currencySymbol;
420
421 XalanDOMChar m_decimalSeparator;
422 XalanDOMChar m_digit;
423 XalanDOMChar m_groupingSeparator;
424
425 XalanDOMString m_infinity;
426 XalanDOMString m_internationalCurrencySymbol;
427
428 XalanDOMChar m_minusSign;
429 XalanDOMChar m_monetaryDecimalSeparator;
430
431 XalanDOMString m_NaN;
432
433 XalanDOMChar m_patternSeparator;
434 XalanDOMChar m_percent;
435 XalanDOMChar m_perMill;
436 XalanDOMChar m_zeroDigit;
437};
438
439
440
441}
442
443
444
445#endif // XALANDECIMALFORMATSYMBOLS_HEADER_GUARD_1357924680
#define XALAN_PLATFORMSUPPORT_EXPORT
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
void setInfinity(const XalanDOMChar *theInfinity)
Sets the string used to represent infinity.
XalanDOMChar getPercent() const
Retrieve the character used for percent sign, "%," for example.
XalanDOMChar getPatternSeparator() const
Retrieve the character used to separate positive and negative subpatterns in a pattern.
const XalanDOMString & getNaN() const
Retrieve the string used for a numeric value that cannot be represented as a number.
const XalanDOMString & getInfinity() const
Retrieve the string used to represent infinity.
bool operator==(const XalanDecimalFormatSymbols &theRHS) const
void setCurrencySymbol(const XalanDOMChar *theCurrencySymbol)
Sets the string denoting the local currency, "$", for example.
const XalanDOMString & getCurrencySymbol() const
Retrieve the string denoting the local currency, "$", for example.
void setZeroDigit(XalanDOMChar theZeroDigit)
Sets the character used for zero.
void setNaN(const XalanDOMString &theNaN)
Sets the string used for a numeric value that cannot be represented as a number.
void setNaN(const XalanDOMChar *theNaN)
Sets the string used for a numeric value that cannot be represented as a number.
XalanDOMChar getMonetaryDecimalSeparator() const
Retrieve the monetary decimal separator.
void setPercent(XalanDOMChar thePercent)
Sets the character used for percent sign, "%," for example.
XalanDOMChar getGroupingSeparator() const
Retrieve the character used for thousands separator, "," for example.
void setInfinity(const XalanDOMString &theInfinity)
Sets the string used to represent infinity.
void setCurrencySymbol(const XalanDOMString &theCurrencySymbol)
Sets the string denoting the local currency, "$", for example.
XalanDOMChar getPerMill() const
Retrieve the character used for per thousand sign.
void setDecimalSeparator(XalanDOMChar theDecimalSeparator)
Sets the character used for decimal sign, '.
void setGroupingSeparator(XalanDOMChar theGroupingSeparator)
Sets the character used for thousands separator, "," for example.
bool operator!=(const XalanDecimalFormatSymbols &theRHS) const
XalanDOMChar getDigit() const
Retrieve character used for a digit in a pattern.
void setInternationalCurrencySymbol(const XalanDOMString &theInternationalCurrencySymbol)
Sets the international string denoting the local currency.
void setPatternSeparator(XalanDOMChar thePatternSeparator)
Sets the character used to separate positive and negative subpatterns in a pattern.
XalanDecimalFormatSymbols(MemoryManager &theManager)
void setPerMill(XalanDOMChar thePerMill)
Sets the character used for per thousand sign.
XalanDOMChar getMinusSign() const
Retrieve the character used to represent minus sign.
void setMinusSign(XalanDOMChar theMinusSign)
Sets the character used to represent minus sign.
void setInternationalCurrencySymbol(const XalanDOMChar *theInternationalCurrencySymbol)
Sets the international string denoting the local currency.
XalanDOMChar getDecimalSeparator() const
Retrieve the character used for decimal sign, '.
XalanDOMChar getZeroDigit() const
Retrieve the character used for zero.
XalanDecimalFormatSymbols & operator=(const XalanDecimalFormatSymbols &theRHS)
void setMonetaryDecimalSeparator(XalanDOMChar theMonetaryDecimalSeparator)
Sets the monetary decimal separator.
const XalanDOMString & getInternationalCurrencySymbol() const
Retrieve the international string denoting the local currency.
XalanDecimalFormatSymbols(const XalanDecimalFormatSymbols &theSource, MemoryManager &theManager)
void setDigit(XalanDOMChar theDigit)
Sets the character used for a digit in a pattern.
bool operator==(const XalanVector< Type > &theLHS, const XalanVector< Type > &theRHS)