dbertoni 2002/11/07 10:58:07
Modified: c/src/XSLT ElemNumber.cpp ElemNumber.hpp
XalanNumberingResourceBundle.cpp
XalanNumberingResourceBundle.hpp
Log:
32/64 bit issues.
Revision Changes Path
1.69 +105 -113 xml-xalan/c/src/XSLT/ElemNumber.cpp
Index: ElemNumber.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemNumber.cpp,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -r1.68 -r1.69
--- ElemNumber.cpp 3 Nov 2002 03:41:05 -0000 1.68
+++ ElemNumber.cpp 7 Nov 2002 18:58:07 -0000 1.69
@@ -90,7 +90,6 @@
#include "AVT.hpp"
#include "Constants.hpp"
-#include "CountersTable.hpp"
#include "StylesheetConstructionContext.hpp"
#include "StylesheetExecutionContext.hpp"
@@ -476,7 +475,7 @@
XalanNode*
sourceNode,
const MutableNodeRefList& ancestors,
CountersTable& ctable,
- int
numberList[],
+ CountType
numberList[],
NodeRefListBase::size_type
numberListLength,
XalanDOMString&
theResult) const
{
@@ -516,11 +515,11 @@
const double theValue = countObj->num();
- int theNumber = 0;
+ CountType theNumber = 0;
if (DoubleSupport::isNaN(theValue) == false)
{
- theNumber = int(DoubleSupport::round(theValue));
+ theNumber = CountType(DoubleSupport::round(theValue));
}
formatNumberList(
@@ -536,7 +535,7 @@
if(eAny == m_level)
{
- const int theNumber =
+ const CountType theNumber =
ctable.countNode(executionContext, *this,
sourceNode);
formatNumberList(
@@ -566,7 +565,7 @@
if (lastIndex < theStackArrayThreshold)
{
- int
numberList[theStackArrayThreshold];
+ CountType
numberList[theStackArrayThreshold];
getCountString(
executionContext,
@@ -579,7 +578,7 @@
}
else
{
- IntArrayType numberList;
+ CountTypeArrayType numberList;
numberList.resize(lastIndex);
@@ -854,7 +853,7 @@
void
ElemNumber::formatNumberList(
StylesheetExecutionContext&
executionContext,
- const int
theList[],
+ const CountType
theList[],
NodeRefListBase::size_type theListLength,
XalanNode*
contextNode,
XalanDOMString&
theResult) const
@@ -961,7 +960,7 @@
XalanDOMString& theIntermediateResult =
theGuard2.get();
- for(unsigned int i = 0; i < theListLength; i++)
+ for(NodeRefListBase::size_type i = 0; i < theListLength; i++)
{
if (it != trailerStrIt)
{
@@ -1041,11 +1040,11 @@
void
ElemNumber::traditionalAlphaCount(
- int
theValue,
+ CountType
theValue,
const XalanNumberingResourceBundle&
theResourceBundle,
XalanDOMString&
theResult) const
{
- typedef XalanNumberingResourceBundle::IntVectorType
IntVectorType;
+ typedef XalanNumberingResourceBundle::NumberTypeVectorType
NumberTypeVectorType;
typedef XalanNumberingResourceBundle::DigitsTableVectorType
DigitsTableVectorType;
typedef XalanNumberingResourceBundle::eNumberingMethod
eNumberingMethod;
typedef XalanNumberingResourceBundle::eMultiplierOrder
eMultiplierOrder;
@@ -1058,7 +1057,7 @@
XalanDOMCharVectorType table;
// index in table of the last character that we stored
- IntVectorType::size_type lookupIndex = 1; // start off with
anything other than zero to make correction work
+ NumberTypeVectorType::size_type lookupIndex = 1; // start off with
anything other than zero to make correction work
// Create a buffer to hold the result
// TODO: size of the table can be determined by computing
@@ -1070,16 +1069,16 @@
//String orientation = thisBundle.getString(Constants.LANG_ORIENTATION);
// next character to set in the buffer
- int charPos = 0;
+ size_t charPos = 0;
// array of number groups: ie.1000, 100, 10, 1
- const IntVectorType& groups = theResourceBundle.getNumberGroups();
+ const NumberTypeVectorType& groups =
theResourceBundle.getNumberGroups();
- const IntVectorType::size_type groupsSize = groups.size();
+ const NumberTypeVectorType::size_type groupsSize = groups.size();
// array of tables of hundreds, tens, digits. Indexes into the vectors
// in the digits table.
- const IntVectorType& tables =
theResourceBundle.getDigitsTableTable();
+ const NumberTypeVectorType& tables =
theResourceBundle.getDigitsTableTable();
const DigitsTableVectorType& digitsTable =
theResourceBundle.getDigitsTable();
@@ -1094,9 +1093,9 @@
{
const eMultiplierOrder mult_order =
theResourceBundle.getMultiplierOrder();
- const IntVectorType& multiplier =
theResourceBundle.getMultipliers();
+ const NumberTypeVectorType& multiplier =
theResourceBundle.getMultipliers();
- const IntVectorType::size_type multiplierSize =
multiplier.size();
+ const NumberTypeVectorType::size_type multiplierSize =
multiplier.size();
const XalanDOMCharVectorType& zeroChar =
theResourceBundle.getZeroChar();
@@ -1104,12 +1103,12 @@
const XalanDOMCharVectorType& multiplierChars =
theResourceBundle.getMultiplierChars();
- IntVectorType::size_type i = 0;
+ CountTypeArrayType::size_type i = 0;
// skip to correct multiplier
while (i < multiplierSize && theValue < multiplier[i])
{
- i++;
+ ++i;
}
do
@@ -1124,7 +1123,7 @@
{
if (zeroCharSize == 0)
{
- i++;
+ ++i;
}
else
{
@@ -1133,17 +1132,17 @@
buf[charPos++] = zeroChar[0];
}
- i++;
+ ++i;
}
}
else if (theValue >= multiplier[i])
{
- int mult = theValue / multiplier[i];
+ const CountType mult = theValue /
multiplier[i];
theValue = theValue % multiplier[i];
// save this.
- IntVectorType::size_type k = 0;
+ CountTypeArrayType::size_type k = 0;
while (k < groupsSize)
{
@@ -1166,7 +1165,7 @@
table.resize(THElettersSize +
1);
- const IntVectorType::size_type
tableSize = table.size();
+ const
CountTypeArrayType::size_type tableSize = table.size();
XalanDOMCharVectorType::size_type j = 0;
@@ -1231,7 +1230,7 @@
}
// Now do additive part...
- IntVectorType::size_type count = 0;
+ CountTypeArrayType::size_type count = 0;
// do this for each table of hundreds, tens, digits...
while (count < groupsSize)
@@ -1251,7 +1250,7 @@
table.resize(thelettersSize + 1);
- const IntVectorType::size_type tableSize =
table.size();
+ const CountTypeArrayType::size_type tableSize =
table.size();
XalanDOMCharVectorType::size_type j = 0;
@@ -1291,7 +1290,7 @@
if (fError == true)
{
- theResult = XALAN_STATIC_UCODE_STRING("#error");
+ theResult = s_errorString;
}
else
{
@@ -1311,7 +1310,7 @@
XalanNode*
contextNode,
XalanDOMChar
numberType,
XalanDOMString::size_type numberWidth,
- int
listElement,
+ CountType
listElement,
XalanDOMString&
theResult) const
{
switch(numberType)
@@ -1327,11 +1326,11 @@
break;
case XalanUnicode::charLetter_I:
- long2roman(executionContext, contextNode, listElement,
true, theResult);
+ long2roman(listElement, true, theResult);
break;
case XalanUnicode::charLetter_i:
- long2roman(executionContext, contextNode, listElement,
true, theResult);
+ long2roman(listElement, true, theResult);
theResult = toLowerCaseASCII(theResult);
break;
@@ -1355,7 +1354,6 @@
// Handle the special case of Greek letters for now
case elalphaNumberType:
{
- // A string to hold the result.
StylesheetExecutionContext::GetAndReleaseCachedString
theGuard(executionContext);
XalanDOMString& letterVal =
theGuard.get();
@@ -1393,7 +1391,11 @@
{
const XalanDOMString::size_type
nPadding = numberWidth - lengthNumString;
- const XalanDOMString padString =
formatter->format(0);
+
StylesheetExecutionContext::GetAndReleaseCachedString
theGuard(executionContext);
+
+ XalanDOMString& padString =
theGuard.get();
+
+ padString = formatter->format(0);
reserve(theResult, nPadding *
length(padString) + lengthNumString + 1);
@@ -1411,20 +1413,18 @@
void
ElemNumber::int2singlealphaCount(
- int val,
+ CountType val,
const XalanDOMString& table,
XalanDOMString& theResult)
{
assert(int(length(table)) == length(table));
- const int radix = int(length(table));
+ const CountType radix = length(table);
// TODO: throw error on out of range input
if (val > radix)
{
- theResult = XalanDOMString(XALAN_STATIC_UCODE_STRING("#E(") +
- LongToDOMString(val) +
- XALAN_STATIC_UCODE_STRING(")"));
+ theResult = s_errorString;
}
else
{
@@ -1438,19 +1438,19 @@
void
ElemNumber::int2alphaCount(
- int
val,
+ CountType val,
const XalanDOMChar table[],
XalanDOMString::size_type length,
XalanDOMString& theResult)
{
- assert(int(length) == length);
+ assert(length != 0);
- const int radix = int(length);
+ const CountType radix = length;
// Create a buffer to hold the result
// TODO: size of the table can be determined by computing
// logs of the radix. For now, we fake it.
- const int buflen = 100;
+ const size_t buflen = 100;
XalanDOMChar buf[buflen + 1];
@@ -1461,10 +1461,10 @@
#endif
// next character to set in the buffer
- int charPos = buflen - 1 ; // work backward through buf[]
+ size_t charPos = buflen - 1 ; // work backward through buf[]
// index in table of the last character that we stored
- int lookupIndex = 1; // start off with anything other than zero to
make correction work
+ size_t lookupIndex = 1; // start off with anything other than zero to
make correction work
// Correction number
//
@@ -1491,7 +1491,7 @@
// "radix-1" acts like "-1" when run through the mod operator, but with
the
// desireable characteristic that it never produces a negative number.
- int correction = 0;
+ CountType correction = 0;
// TODO: throw error on out of range input
@@ -1525,7 +1525,7 @@
void
ElemNumber::tradAlphaCount(
- int /* val */,
+ CountType /* val */,
XalanDOMString& /* theResult */)
{
// @@ JMD: We don't do languages yet, so this is just a placeholder
@@ -1536,74 +1536,48 @@
void
ElemNumber::long2roman(
- StylesheetExecutionContext&
executionContext,
- XalanNode*
contextNode,
- long
val,
- bool
prefixesAreOK,
- XalanDOMString&
theResult) const
-{
- if(val < 0)
- {
- executionContext.error(
- "I and i can only format positive numbers",
- contextNode,
- getLocator());
-
- }
- else
- {
- long2roman(val, prefixesAreOK, theResult);
- }
-}
-
-
-
-void
-ElemNumber::long2roman(
- long val,
+ CountType val,
bool prefixesAreOK,
XalanDOMString& theResult)
{
- if(val < 0)
+ if(val == 0)
{
- theResult = XalanDOMString(XALAN_STATIC_UCODE_STRING("#E(") +
-
LongToDOMString(val) +
-
XALAN_STATIC_UCODE_STRING(")"));
+ theResult = XalanUnicode::charDigit_0;;
}
- else if(val == 0)
+ else if (val > 3999)
{
- theResult = XALAN_STATIC_UCODE_STRING("0");
+ theResult = s_errorString;
}
- else if (val <= 3999L)
+ else
{
clear(theResult);
- int place = 0;
+ size_t place = 0;
- do
+ DecimalToRoman::ValueType localValue = val;
+
+ do
{
- while (val >= s_romanConvertTable[place].m_postValue)
+ while (localValue >=
s_romanConvertTable[place].m_postValue)
{
theResult +=
s_romanConvertTable[place].m_postLetter;
- val -= s_romanConvertTable[place].m_postValue;
+ localValue -=
s_romanConvertTable[place].m_postValue;
}
if (prefixesAreOK)
{
- if (val >=
s_romanConvertTable[place].m_preValue)
+ if (localValue >=
s_romanConvertTable[place].m_preValue)
{
theResult +=
s_romanConvertTable[place].m_preLetter;
- val -=
s_romanConvertTable[place].m_preValue;
+ localValue -=
s_romanConvertTable[place].m_preValue;
}
}
- ++place;
+ ++place;
}
- while (val > 0);
- }
- else
- {
- theResult = XALAN_STATIC_UCODE_STRING("#error");
+ while (localValue > 0);
+
+ assert(localValue == 0);
}
}
@@ -1923,59 +1897,75 @@
0
};
+
+
+const XalanDOMChar ElemNumber::s_errorString[] =
+{
+ XalanUnicode::charNumberSign,
+ XalanUnicode::charLetter_e,
+ XalanUnicode::charLetter_r,
+ XalanUnicode::charLetter_r,
+ XalanUnicode::charLetter_o,
+ XalanUnicode::charLetter_r,
+ 0
+};
+
+
+
const DecimalToRoman ElemNumber::s_romanConvertTable[] =
{
{
- 1000L,
+ 1000,
{ XalanUnicode::charLetter_M, 0 },
- 900L,
+ 900,
{ XalanUnicode::charLetter_C, XalanUnicode::charLetter_M, 0 }
},
{
- 500L,
+ 500,
{ XalanUnicode::charLetter_D, 0 },
- 400L,
+ 400,
{ XalanUnicode::charLetter_C, XalanUnicode::charLetter_D, 0 }
},
{
- 100L,
+ 100,
{ XalanUnicode::charLetter_C, 0 },
- 90L,
+ 90,
{ XalanUnicode::charLetter_X, XalanUnicode::charLetter_C, 0 }
},
{
- 50L,
+ 50,
{ XalanUnicode::charLetter_L, 0 },
- 40L,
+ 40,
{ XalanUnicode::charLetter_X, XalanUnicode::charLetter_L, 0 }
},
{
- 10L,
+ 10,
{ XalanUnicode::charLetter_X, 0 },
- 9L,
+ 9,
{ XalanUnicode::charLetter_I, XalanUnicode::charLetter_X, 0 }
},
{
- 5L,
+ 5,
{ XalanUnicode::charLetter_V, 0 },
- 4L,
+ 4,
{ XalanUnicode::charLetter_I, XalanUnicode::charLetter_V, 0 }
},
{
- 1L,
+ 1,
{ XalanUnicode::charLetter_I, 0 },
- 1L,
+ 1,
{ XalanUnicode::charLetter_I, 0 }
}
};
+
static XalanNumberingResourceBundle s_elalphaResourceBundle;
const XalanNumberingResourceBundle& ElemNumber::s_elalphaResourceBundle =
@@ -2009,16 +1999,18 @@
XalanUnicode::charLetter_Y, XalanUnicode::charLetter_Z, 0
};
- static const int elalphaNumberGroups[] =
+ typedef XalanNumberingResourceBundle::NumberType NumberType;
+
+ static const NumberType elalphaNumberGroups[] =
{
100, 10, 1
};
- const size_t elalphaNumberGroupsCount = sizeof(elalphaNumberGroups)
/ sizeof(int);
+ const size_t elalphaNumberGroupsCount = sizeof(elalphaNumberGroups)
/ sizeof(elalphaNumberGroups[0]);
- static const int elalphaMultipliers[] = { 1000 };
+ static const NumberType elalphaMultipliers[] = { 1000 };
- const size_t elalphaMultipliersCount = sizeof(elalphaMultipliers) /
sizeof(int);
+ const size_t elalphaMultipliersCount = sizeof(elalphaMultipliers) /
sizeof(elalphaMultipliers[0]);
static const XalanDOMChar elalphaMultiplierChars[] = { 0x03d9, 0
};
@@ -2038,7 +2030,7 @@
};
typedef XalanNumberingResourceBundle::DigitsTableVectorType
DigitsTableVectorType;
- typedef XalanNumberingResourceBundle::IntVectorType
IntVectorType;
+ typedef XalanNumberingResourceBundle::NumberTypeVectorType
NumberTypeVectorType;
// Create the table of characters for the various digit positions...
DigitsTableVectorType theElalphaDigitsTable;
@@ -2053,7 +2045,7 @@
// This table will indicate which positions the vectors of digits are in
// the table...
- IntVectorType theDigitsTableTable;
+ NumberTypeVectorType theDigitsTableTable;
theDigitsTableTable.reserve(3);
@@ -2074,9 +2066,9 @@
XalanNumberingResourceBundle::eLeftToRight,
XalanNumberingResourceBundle::eMultiplicativeAdditive,
XalanNumberingResourceBundle::ePrecedes,
- ~0,
- IntVectorType(elalphaNumberGroups, elalphaNumberGroups +
elalphaNumberGroupsCount),
- IntVectorType(elalphaMultipliers, elalphaMultipliers +
elalphaMultipliersCount),
+ ~NumberType(0),
+ NumberTypeVectorType(elalphaNumberGroups, elalphaNumberGroups +
elalphaNumberGroupsCount),
+ NumberTypeVectorType(elalphaMultipliers, elalphaMultipliers +
elalphaMultipliersCount),
XalanDOMCharVectorType(),
XalanDOMCharVectorType(elalphaMultiplierChars,
elalphaMultiplierChars + length(elalphaMultiplierChars)),
theElalphaDigitsTable,
1.43 +24 -37 xml-xalan/c/src/XSLT/ElemNumber.hpp
Index: ElemNumber.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemNumber.hpp,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- ElemNumber.hpp 3 Nov 2002 03:41:05 -0000 1.42
+++ ElemNumber.hpp 7 Nov 2002 18:58:07 -0000 1.43
@@ -77,13 +77,13 @@
+#include <XSLT/CountersTable.hpp>
#include <XSLT/DecimalToRoman.hpp>
#include <XSLT/XalanNumberingResourceBundle.hpp>
class AVT;
-class CountersTable;
class MutableNodeRefList;
class XalanNumberFormat;
class XPath;
@@ -93,12 +93,10 @@
class ElemNumber: public ElemTemplateElement
{
-private:
-
- struct Counter;
-
public:
+ typedef CountersTable::CountType CountType;
+
enum eLevel
{
eSingle,
@@ -107,9 +105,9 @@
};
#if defined(XALAN_NO_NAMESPACES)
- typedef vector<int>
IntArrayType;
+ typedef vector<CountType> CountTypeArrayType;
#else
- typedef std::vector<int>
IntArrayType;
+ typedef std::vector<CountType> CountTypeArrayType;
#endif
/**
@@ -146,7 +144,7 @@
~ElemNumber();
// These methods are inherited from ElemTemplateElement ...
-
+
virtual const XalanDOMString&
getElementName() const;
@@ -234,7 +232,7 @@
XalanNode*
sourceNode,
const MutableNodeRefList& ancestors,
CountersTable& ctable,
- int
numberList[],
+ CountType
numberList[],
NodeRefListBase::size_type
numberListLength,
XalanDOMString&
theResult) const;
@@ -267,7 +265,7 @@
XalanNode*
contextNode) const;
/**
- * Format an array of integers into a formatted string.
+ * Format an array of integrals into a formatted string.
*
* @param executionContext The current execution context.
* @param theList Array of one or more integer numbers.
@@ -278,13 +276,13 @@
void
formatNumberList(
StylesheetExecutionContext&
executionContext,
- const int
theList[],
+ const CountType
theList[],
NodeRefListBase::size_type theListLength,
XalanNode*
contextNode,
XalanDOMString&
formattedNumber) const;
/**
- * Convert a long integer into alphabetic counting, in other words
+ * Convert an intergral into alphabetic counting, in other words
* count using the sequence A B C ... Z.
* @param val Value to convert -- must be greater than zero.
* @param table a table containing one character for each digit in the
radix
@@ -296,12 +294,12 @@
*/
static void
int2singlealphaCount(
- int val,
+ CountType val,
const XalanDOMString& table,
XalanDOMString& theResult);
/**
- * Convert a long integer into alphabetic counting, in other words
+ * Convert an integral into alphabetic counting, in other words
* count using the sequence A B C ... Z AA AB AC.... etc.
* @param val Value to convert -- must be greater than zero.
* @param table a table containing one character for each digit in the
radix
@@ -314,7 +312,7 @@
*/
static void
int2alphaCount(
- int
val,
+ CountType val,
const XalanDOMChar table[],
XalanDOMString::size_type length,
XalanDOMString& theResult);
@@ -332,11 +330,11 @@
*/
static void
tradAlphaCount(
- int val,
+ CountType val,
XalanDOMString& theResult);
/**
- * Convert a long integer into roman numerals.
+ * Convert an integral into roman numerals.
* @param val Value to convert.
* @param prefixesAreOK true to enable prefix notation (e.g. 4 = "IV"),
false to disable prefix notation (e.g. 4 = "IIII").
* @param theResult The formatted Roman numeral string.
@@ -345,28 +343,12 @@
*/
static void
long2roman(
- long val,
+ CountType val,
bool prefixesAreOK,
XalanDOMString& theResult);
private:
- /**
- * Convert a long integer into roman numerals.
- * @param executionContext The current execution context.
- * @param contextNode The current context node.
- * @param val Value to convert.
- * @param prefixesAreOK true to enable prefix notation (e.g. 4 = "IV"),
false to disable prefix notation (e.g. 4 = "IIII").
- * @param theResult The formatted Roman numeral string.
- */
- void
- long2roman(
- StylesheetExecutionContext&
executionContext,
- XalanNode*
contextNode,
- long
val,
- bool
prefixesAreOK,
- XalanDOMString&
theResult) const;
-
void
evaluateLetterValueAVT(
StylesheetExecutionContext&
executionContext,
@@ -375,7 +357,7 @@
void
traditionalAlphaCount(
- int
theValue,
+ CountType
theValue,
const XalanNumberingResourceBundle&
theResourceBundle,
XalanDOMString&
theResult) const;
@@ -388,14 +370,14 @@
XalanNode*
contextNode,
XalanDOMChar
numberType,
XalanDOMString::size_type numberWidth,
- int
listElement,
+ CountType
listElement,
XalanDOMString&
theResult) const;
const XPath* m_countMatchPattern;
const XPath* m_fromMatchPattern;
const XPath* m_valueExpr;
- int m_level; // =
Constants.NUMBERLEVEL_SINGLE;
+ CountType m_level; // = Constants.NUMBERLEVEL_SINGLE;
const AVT* m_format_avt;
const AVT* m_lang_avt;
@@ -459,6 +441,11 @@
* The string "traditional".
*/
static const XalanDOMChar
s_traditionalString[];
+
+ /**
+ * The string "#error".
+ */
+ static const XalanDOMChar s_errorString[];
/**
* Chars for converting integers into alpha counts.
1.3 +5 -5 xml-xalan/c/src/XSLT/XalanNumberingResourceBundle.cpp
Index: XalanNumberingResourceBundle.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/XalanNumberingResourceBundle.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- XalanNumberingResourceBundle.cpp 6 Sep 2002 06:09:57 -0000 1.2
+++ XalanNumberingResourceBundle.cpp 7 Nov 2002 18:58:07 -0000 1.3
@@ -68,13 +68,13 @@
eOrientation theOrientation,
eNumberingMethod
theNumberingMethod,
eMultiplierOrder
theMultiplierOrder,
- int
theMaxNumericalValue,
- const IntVectorType& theNumberGroups,
- const IntVectorType& theMultipliers,
+ NumberType
theMaxNumericalValue,
+ const NumberTypeVectorType& theNumberGroups,
+ const NumberTypeVectorType& theMultipliers,
const XalanDOMCharVectorType& theZeroChar,
const XalanDOMCharVectorType& theMultiplierChars,
const DigitsTableVectorType& theDigitsTable,
- const IntVectorType& theDigitsTableTable) :
+ const NumberTypeVectorType& theDigitsTableTable) :
m_language(theHelpLanguage),
m_uiLanguage(theLanguage),
m_helpLanguage(theUILanguage),
@@ -166,7 +166,7 @@
}
{
- const int temp = m_maxNumericalValue;
+ const NumberType temp = m_maxNumericalValue;
m_maxNumericalValue = theOther.m_maxNumericalValue;
1.3 +17 -15 xml-xalan/c/src/XSLT/XalanNumberingResourceBundle.hpp
Index: XalanNumberingResourceBundle.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/XalanNumberingResourceBundle.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- XalanNumberingResourceBundle.hpp 6 Sep 2002 06:09:57 -0000 1.2
+++ XalanNumberingResourceBundle.hpp 7 Nov 2002 18:58:07 -0000 1.3
@@ -77,11 +77,13 @@
{
public:
+ typedef unsigned long
NumberType;
+
#if defined(XALAN_NO_NAMESPACES)
- typedef vector<int>
IntVectorType;
- typedef vector<XalanDOMCharVectorType>
DigitsTableVectorType;
+ typedef vector<NumberType>
NumberTypeVectorType;
+ typedef vector<NumberType>
DigitsTableVectorType;
#else
- typedef std::vector<int>
IntVectorType;
+ typedef std::vector<unsigned long>
NumberTypeVectorType;
typedef std::vector<XalanDOMCharVectorType>
DigitsTableVectorType;
#endif
@@ -105,13 +107,13 @@
eOrientation theOrientation,
eNumberingMethod
theNumberingMethod,
eMultiplierOrder
theMultiplierOrder,
- int
theMaxNumericalValue,
- const IntVectorType& theNumberGroups,
- const IntVectorType& theMultipliers,
+ NumberType
theMaxNumericalValue,
+ const NumberTypeVectorType& theNumberGroups,
+ const NumberTypeVectorType& theMultipliers,
const XalanDOMCharVectorType& theZeroChar,
const XalanDOMCharVectorType& theMultiplierChars,
const DigitsTableVectorType& theDigitsTable,
- const IntVectorType& theDigitsTableTable);
+ const NumberTypeVectorType& theDigitsTableTable);
explicit
XalanNumberingResourceBundle();
@@ -174,19 +176,19 @@
return m_multiplierOrder;
}
- int
+ NumberType
getMaxNumericalValue() const
{
return m_maxNumericalValue;
}
- const IntVectorType&
+ const NumberTypeVectorType&
getNumberGroups() const
{
return m_numberGroups;
}
- const IntVectorType&
+ const NumberTypeVectorType&
getMultipliers() const
{
return m_multipliers;
@@ -210,7 +212,7 @@
return m_digitsTable;
}
- const IntVectorType&
+ const NumberTypeVectorType&
getDigitsTableTable() const
{
return m_digitsTableTable;
@@ -237,11 +239,11 @@
eMultiplierOrder m_multiplierOrder;
- int m_maxNumericalValue;
+ NumberType m_maxNumericalValue;
- IntVectorType m_numberGroups;
+ NumberTypeVectorType m_numberGroups;
- IntVectorType m_multipliers;
+ NumberTypeVectorType m_multipliers;
XalanDOMCharVectorType m_zeroChar;
@@ -249,7 +251,7 @@
DigitsTableVectorType m_digitsTable;
- IntVectorType m_digitsTableTable;
+ NumberTypeVectorType m_digitsTableTable;
};
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]