18 #if !defined(STLHELPERS_HEADER_GUARD_1357924680)
19 #define STLHELPERS_HEADER_GUARD_1357924680
37 XALAN_CPP_NAMESPACE_BEGIN
60 (*this)(
const_cast<Type*
>(theArg));
66 MemoryManager& theMemoryManager)
72 theMemoryManager.deallocate(theArg);
79 MemoryManager& theMemoryManager)
81 (*this)(
const_cast<Type*
>(theArg), theMemoryManager);
100 #if defined(XALAN_NO_STD_NAMESPACE)
101 struct DeleteFunctor :
public unary_function<const Type*, void>
106 #if defined(XALAN_NO_STD_NAMESPACE)
116 m_memoryManager(theManager)
133 MemoryManager& m_memoryManager;
138 #if !defined(XALAN_SGI_BASED_STL)
144 template <
class PairType>
145 #if defined(XALAN_NO_STD_NAMESPACE)
146 struct select1st :
public unary_function<PairType, PairType::first_type>
148 struct
select1st :
public std::unary_function<PairType, typename PairType::first_type>
151 #if defined(XALAN_NO_STD_NAMESPACE)
152 typedef unary_function<PairType, PairType::first_type>
BaseClassType;
154 typedef std::unary_function<PairType, typename PairType::first_type>
BaseClassType;
171 return thePair.first;
181 template <
class PairType>
182 #if defined(XALAN_NO_STD_NAMESPACE)
183 struct select2nd :
public unary_function<PairType, PairType::second_type>
185 struct
select2nd :
public std::unary_function<PairType, typename PairType::second_type>
188 #if defined(XALAN_NO_STD_NAMESPACE)
189 typedef unary_function<PairType, PairType::second_type>
BaseClassType;
191 typedef std::unary_function<PairType, typename PairType::second_type>
BaseClassType;
208 return thePair.second;
219 template <
class Type>
220 #if defined(XALAN_NO_STD_NAMESPACE)
226 #if defined(XALAN_NO_STD_NAMESPACE)
246 return theArg.clear();
256 #if defined(XALAN_NO_STD_NAMESPACE)
262 #if defined(XALAN_NO_STD_NAMESPACE)
263 typedef unary_function<const typename T::value_type&, void>
BaseClassType;
265 typedef std::unary_function<const typename T::value_type&, void>
BaseClassType;
272 m_memoryManager(theManager)
290 MemoryManager& m_memoryManager;
295 template<
class MapType>
314 #if defined(XALAN_NO_STD_NAMESPACE)
320 #if defined(XALAN_NO_STD_NAMESPACE)
321 typedef binary_function<const T*, const T*, bool>
BaseClassType;
343 while(*theLHS && *theRHS)
345 if (*theLHS != *theRHS)
356 return *theLHS < *theRHS ? true :
false;
365 typedef XALAN_STD_QUALIFIER binary_function<const T*, const T*, bool>
BaseClassType;
383 while(*theLHS && *theRHS)
385 if (*theLHS != *theRHS)
396 if (*theLHS || *theRHS)
409 template <
class ScalarType>
415 return (theResult * 37) + (theResult >> 24) +
size_type(theValue);
439 while (theKey != theEnd)
446 return ++theHashValue;
474 return ++theHashValue;
489 template<
class CollectionType>
495 m_collection(&theCollection)
501 if (m_collection != 0)
503 m_collection->clear();
522 CollectionType* m_collection;
527 template<
class CollectionType,
class DeleteFunctorType>
533 m_collection(&theCollection)
539 if (m_collection != 0)
541 #if !defined(XALAN_NO_STD_NAMESPACE)
546 for_each(m_collection->begin(),
548 DeleteFunctorType(m_collection->getMemoryManager()));
567 CollectionType* m_collection;
573 #if defined(XALAN_NO_STD_NAMESPACE)
574 struct pointer_equals :
public binary_function<const T*, const T*, bool>
579 #if defined(XALAN_NO_STD_NAMESPACE)
580 typedef binary_function<const T*, const T*, bool>
BaseClassType;
594 assert(theLHS != 0 && theRHS != 0);
596 return *theLHS == *theRHS;
603 #if defined(XALAN_NO_STD_NAMESPACE)
609 #if defined(XALAN_NO_STD_NAMESPACE)
627 assert(theOther != 0);
629 return *theOther == *m_arg;
640 #if defined(XALAN_NO_STD_NAMESPACE)
641 struct pointer_less :
public binary_function<const T*, const T*, bool>
643 struct
pointer_less :
public std::binary_function<const T*, const T*, bool>
646 #if defined(XALAN_NO_STD_NAMESPACE)
647 typedef binary_function<const T*, const T*, bool>
BaseClassType;
661 assert(theLHS != 0 && theRHS != 0);
663 #if !defined(XALAN_NO_STD_NAMESPACE)
667 return less<T>()(*theLHS, *theRHS);
674 struct pointer_equal :
public XALAN_STD_QUALIFIER binary_function<const T*, const T*, bool>
676 typedef XALAN_STD_QUALIFIER binary_function<const T*, const T*, bool>
BaseClassType;
687 assert(theLHS != 0 && theRHS != 0);
688 return XALAN_STD_QUALIFIER equal_to<T>()(*theLHS, *theRHS);
695 XALAN_CPP_NAMESPACE_END
699 #endif // STLHELPERS_HEADER_GUARD_1357924680