You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by pe...@apache.org on 2003/10/29 17:18:05 UTC
cvs commit: xml-xerces/c/src/xercesc/util NameIdPool.c RefHash3KeysIdPool.c
peiyongz 2003/10/29 08:18:05
Modified: c/src/xercesc/util NameIdPool.c RefHash3KeysIdPool.c
Log:
size() added and Reset() bug fixed
Revision Changes Path
1.7 +16 -9 xml-xerces/c/src/xercesc/util/NameIdPool.c
Index: NameIdPool.c
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/NameIdPool.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- NameIdPool.c 16 May 2003 06:01:52 -0000 1.6
+++ NameIdPool.c 29 Oct 2003 16:18:05 -0000 1.7
@@ -56,6 +56,9 @@
/**
* $Log$
+ * Revision 1.7 2003/10/29 16:18:05 peiyongz
+ * size() added and Reset() bug fixed
+ *
* Revision 1.6 2003/05/16 06:01:52 knoaman
* Partial implementation of the configurable memory manager.
*
@@ -374,14 +377,7 @@
, fCurIndex(0)
, fToEnum(toEnum)
{
- //
- // Find the next available bucket element in the pool. We use the id
- // array since its very easy to enumerator through by just maintaining
- // an index. If the id counter is zero, then its empty and we leave the
- // current index to zero.
- //
- if (toEnum->fIdCounter)
- fCurIndex = 1;
+ Reset();
}
template <class TElem> NameIdPoolEnumerator<TElem>::
@@ -438,7 +434,18 @@
template <class TElem> void NameIdPoolEnumerator<TElem>::Reset()
{
- fCurIndex = 0;
+ //
+ // Find the next available bucket element in the pool. We use the id
+ // array since its very easy to enumerator through by just maintaining
+ // an index. If the id counter is zero, then its empty and we leave the
+ // current index to zero.
+ //
+ fCurIndex = fToEnum->fIdCounter ? 1:0;
+}
+
+template <class TElem> int NameIdPoolEnumerator<TElem>::size() const
+{
+ return fToEnum->fIdCounter;
}
XERCES_CPP_NAMESPACE_END
1.7 +17 -9 xml-xerces/c/src/xercesc/util/RefHash3KeysIdPool.c
Index: RefHash3KeysIdPool.c
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/RefHash3KeysIdPool.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- RefHash3KeysIdPool.c 2 Jun 2003 15:18:08 -0000 1.6
+++ RefHash3KeysIdPool.c 29 Oct 2003 16:18:05 -0000 1.7
@@ -56,6 +56,9 @@
/**
* $Log$
+ * Revision 1.7 2003/10/29 16:18:05 peiyongz
+ * size() added and Reset() bug fixed
+ *
* Revision 1.6 2003/06/02 15:18:08 neilg
* fix for bug #20092; thanks to Berin Lautenbach
*
@@ -443,14 +446,7 @@
if (!toEnum)
ThrowXML(NullPointerException, XMLExcepts::CPtr_PointerIsZero);
- //
- // Find the next available bucket element in the pool. We use the id
- // array since its very easy to enumerator through by just maintaining
- // an index. If the id counter is zero, then its empty and we leave the
- // current index to zero.
- //
- if (toEnum->fIdCounter)
- fCurIndex = 1;
+ Reset();
}
template <class TVal> RefHash3KeysIdPoolEnumerator<TVal>::~RefHash3KeysIdPoolEnumerator()
@@ -483,7 +479,19 @@
template <class TVal> void RefHash3KeysIdPoolEnumerator<TVal>::Reset()
{
- fCurIndex = 0;
+ //
+ // Find the next available bucket element in the pool. We use the id
+ // array since its very easy to enumerator through by just maintaining
+ // an index. If the id counter is zero, then its empty and we leave the
+ // current index to zero.
+ //
+ fCurIndex = fToEnum->fIdCounter ? 1:0;
+
+}
+
+template <class TVal> int RefHash3KeysIdPoolEnumerator<TVal>::size() const
+{
+ return fToEnum->fIdCounter;
}
XERCES_CPP_NAMESPACE_END
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org