/* Generated automatically by jlpp - do not edit. */ #include static jakelib::lang::String* jakelib2_strings[] = {null, null, null, null, null, null, null, null, null, null, null}; // "de" static jchar chars_jakelib2_str_0[] = {100,101}; // "fr" static jchar chars_jakelib2_str_1[] = {102,114}; // "EUR" static jchar chars_jakelib2_str_2[] = {69,85,82}; // "\u221e" static jchar chars_jakelib2_str_3[] = {0x221e}; // "EUR" static jchar chars_jakelib2_str_4[] = {69,85,82}; // "\ufffd" static jchar chars_jakelib2_str_5[] = {0xfffd}; // "$" static jchar chars_jakelib2_str_6[] = {36}; // "\u221e" static jchar chars_jakelib2_str_7[] = {0x221e}; // "$" static jchar chars_jakelib2_str_8[] = {36}; // "\ufffd" static jchar chars_jakelib2_str_9[] = {0xfffd}; // "jakelib.text.DecimalFormatSyms" static jchar chars_jakelib2_str_10[] = {106,97,107,101,108,105,98,46,116,101,120,116,46,68,101,99,105,109,97,108,70,111,114,109,97,116,83,121,109,115}; #line 1 "text/DecimalFormatSyms.jlc" // -*- c++ -*- /* * Jakelib2 - General purpose C++ library * Copyright (C) 2001 Florian Wolff (florian@donuz.de) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * $Id: DecimalFormatSyms.jlc,v 1.12 2003/09/27 08:10:28 florian Exp $ */ #include "jakelib2.h" #include "jakelib2/io/Serializable.h" #include "jakelib2/text/DecimalFormatSyms.h" using namespace jakelib::lang; using namespace jakelib::text; using namespace jakelib::util; JAKELIB_IMPLEMENT_CLASS("jakelib.text.DecimalFormatSyms", DecimalFormatSyms, Object); /*****************************************************************************\ * DecimalFormatSyms | *****************************************************************************/ DecimalFormatSyms::DecimalFormatSyms(Locale * loc) { init(loc); } DecimalFormatSyms::DecimalFormatSyms() { Locale *loc = Locale::getDefault(); init(loc); } /*****************************************************************************\ * init | *****************************************************************************/ void DecimalFormatSyms::init(Locale * loc) { String* language = loc->getLanguage(); digit = '#'; if (language->equals(JAKELIB_ONDEMAND(jakelib2_strings[0], new jakelib::lang::String(chars_jakelib2_str_0, 0, 2))) || language->equals(JAKELIB_ONDEMAND(jakelib2_strings[1], new jakelib::lang::String(chars_jakelib2_str_1, 0, 2)))) { currencySymbol = JAKELIB_ONDEMAND(jakelib2_strings[2], new jakelib::lang::String(chars_jakelib2_str_2, 0, 3)); decimalSeparator = ','; exponential = 'E'; groupingSeparator = '.'; infinity = JAKELIB_ONDEMAND(jakelib2_strings[3], new jakelib::lang::String(chars_jakelib2_str_3, 0, 1)); intlCurrencySymbol = JAKELIB_ONDEMAND(jakelib2_strings[4], new jakelib::lang::String(chars_jakelib2_str_4, 0, 3)); monetarySeparator = ','; minusSign = '-'; NaN = JAKELIB_ONDEMAND(jakelib2_strings[5], new jakelib::lang::String(chars_jakelib2_str_5, 0, 1)); patternSeparator = ';'; percent = '%'; perMill = 0x2030; zeroDigit = '0'; } else { currencySymbol = JAKELIB_ONDEMAND(jakelib2_strings[6], new jakelib::lang::String(chars_jakelib2_str_6, 0, 1)); decimalSeparator = '.'; exponential = 'E'; groupingSeparator = ','; infinity = JAKELIB_ONDEMAND(jakelib2_strings[7], new jakelib::lang::String(chars_jakelib2_str_7, 0, 1)); intlCurrencySymbol = JAKELIB_ONDEMAND(jakelib2_strings[8], new jakelib::lang::String(chars_jakelib2_str_8, 0, 1)); monetarySeparator = '.'; minusSign = '-'; NaN = JAKELIB_ONDEMAND(jakelib2_strings[9], new jakelib::lang::String(chars_jakelib2_str_9, 0, 1)); patternSeparator = ';'; percent = '%'; perMill = 0x2030; zeroDigit = '0'; } } /*****************************************************************************\ * equals | *****************************************************************************/ jboolean DecimalFormatSyms::equals(jakelib::lang::Object * obj) { if (!(obj->instanceOf(JAKELIB_ONDEMAND(jakelib2_strings[10], new jakelib::lang::String(chars_jakelib2_str_10, 0, 30))))) return false; DecimalFormatSyms *dfs = (DecimalFormatSyms *) obj; return (currencySymbol->equals(dfs->currencySymbol) && decimalSeparator == dfs->decimalSeparator && digit == dfs->digit && exponential == dfs->exponential && groupingSeparator == dfs->groupingSeparator && infinity->equals(dfs->infinity) && intlCurrencySymbol->equals(dfs->intlCurrencySymbol) && minusSign == dfs->minusSign && monetarySeparator == dfs->monetarySeparator && NaN->equals(dfs->NaN) && patternSeparator == dfs->patternSeparator && percent == dfs->percent && perMill == dfs->perMill && zeroDigit == dfs->zeroDigit); } /*****************************************************************************\ * getCurrencySymbol | *****************************************************************************/ jakelib::lang::String * DecimalFormatSyms::getCurrencySymbol() { return currencySymbol; } /*****************************************************************************\ * getDecimalSeparator | *****************************************************************************/ jchar DecimalFormatSyms::getDecimalSeparator() { return decimalSeparator; } /*****************************************************************************\ * getDigit | *****************************************************************************/ jchar DecimalFormatSyms::getDigit() { return digit; } /*****************************************************************************\ * getExponential | *****************************************************************************/ jchar DecimalFormatSyms::getExponential() { return exponential; } /*****************************************************************************\ * getGroupingSeparator | *****************************************************************************/ jchar DecimalFormatSyms::getGroupingSeparator() { return groupingSeparator; } /*****************************************************************************\ * getInfinity | *****************************************************************************/ jakelib::lang::String * DecimalFormatSyms::getInfinity() { return infinity; } /*****************************************************************************\ * getInternationalCurrencySymbol | *****************************************************************************/ jakelib::lang::String * DecimalFormatSyms::getInternationalCurrencySymbol() { return intlCurrencySymbol; } /*****************************************************************************\ * getMinusSign | *****************************************************************************/ jchar DecimalFormatSyms::getMinusSign() { return minusSign; } /*****************************************************************************\ * getGroupingSeparator | *****************************************************************************/ jchar DecimalFormatSyms::getMonetaryDecimalSeparator() { return monetarySeparator; } /*****************************************************************************\ * getNaN | *****************************************************************************/ jakelib::lang::String * DecimalFormatSyms::getNaN() { return NaN; } /*****************************************************************************\ * getPatternSeparator | *****************************************************************************/ jchar DecimalFormatSyms::getPatternSeparator() { return patternSeparator; } /*****************************************************************************\ * getPercent | *****************************************************************************/ jchar DecimalFormatSyms::getPercent() { return percent; } /*****************************************************************************\ * getPerMill | *****************************************************************************/ jchar DecimalFormatSyms::getPerMill() { return perMill; } /*****************************************************************************\ * getZeroDigit | *****************************************************************************/ jchar DecimalFormatSyms::getZeroDigit() { return zeroDigit; } /*****************************************************************************\ * hashCode | *****************************************************************************/ jint DecimalFormatSyms::hashCode() { return (zeroDigit << 16) + (groupingSeparator << 8) + decimalSeparator; } /*****************************************************************************\ * setCurrencySymbol | *****************************************************************************/ void DecimalFormatSyms::setCurrencySymbol(jakelib::lang::String * currency) { currencySymbol = currency; } /*****************************************************************************\ * setDecimalSeparator | *****************************************************************************/ void DecimalFormatSyms::setDecimalSeparator(jchar decimalSep) { decimalSeparator = decimalSep; } /*****************************************************************************\ * setDigit | *****************************************************************************/ void DecimalFormatSyms::setDigit(jchar digit) { this->digit = digit; } /*****************************************************************************\ * setExponential | *****************************************************************************/ void DecimalFormatSyms::setExponential(jchar exp) { exponential = exp; } /*****************************************************************************\ * setGroupingSeparator | *****************************************************************************/ void DecimalFormatSyms::setGroupingSeparator(jchar groupSep) { groupingSeparator = groupSep; } /*****************************************************************************\ * setInfinity | *****************************************************************************/ void DecimalFormatSyms::setInfinity(jakelib::lang::String * infinity) { this->infinity = infinity; } /*****************************************************************************\ * setInternationalCurrencySymbol | *****************************************************************************/ void DecimalFormatSyms::setInternationalCurrencySymbol(jakelib::lang::String * currency) { intlCurrencySymbol = currency; } /*****************************************************************************\ * setMinusSign | *****************************************************************************/ void DecimalFormatSyms::setMinusSign(jchar minusSign) { this->minusSign = minusSign; } /*****************************************************************************\ * setMonetaryDecimalSeparator | *****************************************************************************/ void DecimalFormatSyms::setMonetaryDecimalSeparator(jchar decimalSep) { monetarySeparator = decimalSep; } /*****************************************************************************\ * setNaN | *****************************************************************************/ void DecimalFormatSyms::setNaN(jakelib::lang::String * nan) { NaN = nan; } /*****************************************************************************\ * setPatternSeparator | *****************************************************************************/ void DecimalFormatSyms::setPatternSeparator(jchar patternSep) { patternSeparator = patternSep; } /*****************************************************************************\ * setPercent | *****************************************************************************/ void DecimalFormatSyms::setPercent(jchar percent) { this->percent = percent; } /*****************************************************************************\ * setPerMill | *****************************************************************************/ void DecimalFormatSyms::setPerMill(jchar perMill) { this->perMill = perMill; } /*****************************************************************************\ * setZeroDigit | *****************************************************************************/ void DecimalFormatSyms::setZeroDigit(jchar zeroDigit) { this->zeroDigit = zeroDigit; }