dbertoni 2002/09/05 23:09:38
Modified: c/src/XSLT DecimalToRoman.cpp DecimalToRoman.hpp
Log:
Added swap().
Revision Changes Path
1.3 +37 -1 xml-xalan/c/src/XSLT/DecimalToRoman.cpp
Index: DecimalToRoman.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/DecimalToRoman.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DecimalToRoman.cpp 11 Apr 2000 15:09:22 -0000 1.2
+++ DecimalToRoman.cpp 6 Sep 2002 06:09:38 -0000 1.3
@@ -2,7 +2,7 @@
* The Apache Software License, Version 1.1
*
*
- * Copyright (c) 1999 The Apache Software Foundation. All rights
+ * Copyright (c) 1999-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -73,6 +73,42 @@
+DecimalToRoman::DecimalToRoman() :
+ m_postValue(0),
+ m_postLetter(),
+ m_preValue(0),
+ m_preLetter()
+{
+}
+
+
+
DecimalToRoman::~DecimalToRoman()
{
+}
+
+
+
+void
+DecimalToRoman::swap(DecimalToRoman& theOther)
+{
+ {
+ const long temp = m_postValue;
+
+ m_postValue = theOther.m_postValue;
+
+ theOther.m_postValue = temp;
+ }
+
+ m_postLetter.swap(theOther.m_postLetter);
+
+ {
+ const long temp = m_preValue;
+
+ m_preValue = theOther.m_preValue;
+
+ theOther.m_preValue = temp;
+ }
+
+ m_preLetter.swap(theOther.m_preLetter);
}
1.4 +12 -7 xml-xalan/c/src/XSLT/DecimalToRoman.hpp
Index: DecimalToRoman.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/DecimalToRoman.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- DecimalToRoman.hpp 11 Apr 2000 15:09:22 -0000 1.3
+++ DecimalToRoman.hpp 6 Sep 2002 06:09:38 -0000 1.4
@@ -2,7 +2,7 @@
* The Apache Software License, Version 1.1
*
*
- * Copyright (c) 1999 The Apache Software Foundation. All rights
+ * Copyright (c) 1999-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -84,18 +84,23 @@
* @param preLetter prefix for quantity, for example, "XC" represents 90
*/
DecimalToRoman(
- long postValue = 0L,
- const XalanDOMString& postLetter = XalanDOMString(),
- long preValue = 0L,
- const XalanDOMString& preLetter = XalanDOMString());
+ long postValue,
+ const XalanDOMString& postLetter,
+ long preValue,
+ const XalanDOMString& preLetter);
+
+ DecimalToRoman();
~DecimalToRoman();
- long m_postValue;
+ void
+ swap(DecimalToRoman& theOther);
+
+ long m_postValue;
XalanDOMString m_postLetter;
- long m_preValue;
+ long m_preValue;
XalanDOMString m_preLetter;
};
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]