knoaman 2003/12/16 10:37:14 Modified: c/src/xercesc/util ValueHashTableOf.hpp ValueHashTableOf.c Log: Add nextElementKey method Revision Changes Path 1.9 +6 -1 xml-xerces/c/src/xercesc/util/ValueHashTableOf.hpp Index: ValueHashTableOf.hpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/ValueHashTableOf.hpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- ValueHashTableOf.hpp 16 May 2003 06:01:52 -0000 1.8 +++ ValueHashTableOf.hpp 16 Dec 2003 18:37:14 -0000 1.9 @@ -204,6 +204,11 @@ TVal& nextElement(); void Reset(); + // ----------------------------------------------------------------------- + // New interface specific for key used in ValueHashable + // ----------------------------------------------------------------------- + void* nextElementKey(); + private : // ----------------------------------------------------------------------- 1.7 +19 -0 xml-xerces/c/src/xercesc/util/ValueHashTableOf.c Index: ValueHashTableOf.c =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/ValueHashTableOf.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- ValueHashTableOf.c 16 May 2003 06:01:52 -0000 1.6 +++ ValueHashTableOf.c 16 Dec 2003 18:37:14 -0000 1.7 @@ -56,6 +56,9 @@ /** * $Log$ + * Revision 1.7 2003/12/16 18:37:14 knoaman + * Add nextElementKey method + * * Revision 1.6 2003/05/16 06:01:52 knoaman * Partial implementation of the configurable memory manager. * @@ -389,6 +392,22 @@ findNext(); return saveElem->fData; +} + +template <class TVal> void* ValueHashTableOfEnumerator<TVal>::nextElementKey() +{ + // Make sure we have an element to return + if (!hasMoreElements()) + ThrowXML(NoSuchElementException, XMLExcepts::Enum_NoMoreElements); + + // + // Save the current element, then move up to the next one for the + // next time around. + // + ValueHashTableBucketElem<TVal>* saveElem = fCurElem; + findNext(); + + return saveElem->fKey; }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]