From 855f1afc9d22d6e7ab86d3c4fc6ffd8ff2eb1dda Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Wed, 31 Jan 2001 02:00:21 +0000 Subject: [PATCH] added member function that returns the number of entries installed --- src/libCom/cxxTemplates/resourceLib.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/libCom/cxxTemplates/resourceLib.h b/src/libCom/cxxTemplates/resourceLib.h index 90aaaf54e..c13338958 100644 --- a/src/libCom/cxxTemplates/resourceLib.h +++ b/src/libCom/cxxTemplates/resourceLib.h @@ -160,6 +160,8 @@ public: void traverse ( pSetMFArg(pCB) ); void traverseConst ( pSetMFArgConst(pCB) ) const; + unsigned numEntriesInstalled () const + private: tsSLList *pTable; unsigned hashIdMask; @@ -338,7 +340,6 @@ resTable::resTable ( unsigned nHashTableEntries ) : this->hashIdNBits = nbits; this->hashIdMask = mask; - this->nInUse = 0u; this->pTable = new tsSLList [1<pTable==0) { throwWithLocation ( dynamicMemoryAllocationFailed () ); @@ -468,6 +469,12 @@ void resTable::traverseConst (pSetMFArgConst(pCB)) const } } +template +inline void resTable::numEntriesInstalled () const +{ + return this->nInUse; +} + // // add a res to the resTable //