18#if !defined(STLHELPERS_HEADER_GUARD_1357924680)
19#define STLHELPERS_HEADER_GUARD_1357924680
60 (*this)(
const_cast<Type*
>(theArg));
66 MemoryManager& theMemoryManager)
72 theMemoryManager.deallocate(theArg);
79 MemoryManager& theMemoryManager)
81 (*this)(
const_cast<Type*
>(theArg), theMemoryManager);
88XalanDestroyFunctor<Type>
103 m_memoryManager(theManager)
120 MemoryManager& m_memoryManager;
139 return theArg.clear();
152 m_memoryManager(theManager)
170 MemoryManager& m_memoryManager;
175template<
class MapType>
176MapValueDeleteFunctor<MapType>
207 const T* theRHS)
const
209 while(*theLHS && *theRHS)
211 if (*theLHS != *theRHS)
222 return *theLHS < *theRHS ? true :
false;
242 const T* theRHS)
const
244 while(*theLHS && *theRHS)
246 if (*theLHS != *theRHS)
257 if (*theLHS || *theRHS)
270template <
class ScalarType>
276 return (theResult * 37) + (theResult >> 24) +
size_type(theValue);
288 size_t theInitialValue = 0)
const
290 size_t theHashValue = theInitialValue;
295 while (theKey != theEnd)
302 return ++theHashValue;
314 size_t theInitialValue = 0)
const
316 size_t theHashValue = theInitialValue;
325 return ++theHashValue;
340template<
class CollectionType>
346 m_collection(&theCollection)
352 if (m_collection != 0)
354 m_collection->clear();
373 CollectionType* m_collection;
378template<
class CollectionType,
class DeleteFunctorType>
384 m_collection(&theCollection)
390 if (m_collection != 0)
395 for_each(m_collection->begin(),
397 DeleteFunctorType(m_collection->getMemoryManager()));
416 CollectionType* m_collection;
427 const T* theRHS)
const
429 assert(theLHS != 0 && theRHS != 0);
431 return *theLHS == *theRHS;
447 const T* theOther)
const
449 assert(theOther != 0);
451 return *theOther == *m_arg;
467 const T* theRHS)
const
469 assert(theLHS != 0 && theRHS != 0);
473 return less<T>()(*theLHS, *theRHS);
485 const T* theRHS)
const
487 assert(theLHS != 0 && theRHS != 0);
488 return std::equal_to<T>()(*theLHS, *theRHS);
CollectionClearGuard(CollectionType &theCollection)
CollectionDeleteGuard(CollectionType &theCollection)
MapValueDeleteFunctor< MapType > makeMapValueDeleteFunctor(MapType &theMap)
XalanDestroyFunctor< Type > makeXalanDestroyFunctor(const Type *)
size_t XalanScalarHash(ScalarType theValue, size_t theResult)
Functor to call a clear() member function on its argument.
void operator()(Type &theArg) const
Retrieve the value of a key-value pair.
void operator()(const Type *thePointer) const
Delete the object pointed to by argument.
DeleteFunctor(MemoryManager &theManager)
Functor to delete value objects in maps, used in STL iteration algorithms.
void operator()(const typename T::value_type &thePair) const
Delete the value object in a map value pair.
MapValueDeleteFunctor(MemoryManager &theManager)
void operator()(Type *theArg)
void operator()(Type *theArg, MemoryManager &theMemoryManager)
void operator()(const Type *theArg)
void operator()(const Type *theArg, MemoryManager &theMemoryManager)
void operator()(Type &theArg)
hash_null_terminated_array< XalanDOMChar > Hasher
equal_null_terminated_arrays< XalanDOMChar > Comparator
bool operator()(const T *theLHS, const T *theRHS) const
Compare the values of two objects.
This functor is designed to compare 0-terminated arrays.
bool operator()(const T *theLHS, const T *theRHS) const
Compare the values of two objects.
bool operator()(const T *theLHS, const T *theRHS) const
bool operator()(const T *theOther) const
pointer_equals_predicate(const T *theArg)
bool operator()(const T *theLHS, const T *theRHS) const
bool operator()(const T *theLHS, const T *theRHS) const