16 #if !defined(STLHELPERS_HEADER_GUARD_1357924680)
17 #define STLHELPERS_HEADER_GUARD_1357924680
35 XALAN_CPP_NAMESPACE_BEGIN
58 (*this)(
const_cast<Type*
>(theArg));
70 theMemoryManager.deallocate(theArg);
79 (*this)(
const_cast<Type*
>(theArg), theMemoryManager);
98 #if defined(XALAN_NO_STD_NAMESPACE)
99 struct DeleteFunctor :
public unary_function<const Type*, void>
104 #if defined(XALAN_NO_STD_NAMESPACE)
114 m_memoryManager(theManager)
136 #if !defined(XALAN_SGI_BASED_STL)
142 template <
class PairType>
143 #if defined(XALAN_NO_STD_NAMESPACE)
144 struct select1st :
public unary_function<PairType, PairType::first_type>
146 struct
select1st :
public std::unary_function<PairType, typename PairType::first_type>
149 #if defined(XALAN_NO_STD_NAMESPACE)
150 typedef unary_function<PairType, PairType::first_type>
BaseClassType;
152 typedef std::unary_function<PairType, typename PairType::first_type>
BaseClassType;
169 return thePair.first;
179 template <
class PairType>
180 #if defined(XALAN_NO_STD_NAMESPACE)
181 struct select2nd :
public unary_function<PairType, PairType::second_type>
183 struct
select2nd :
public std::unary_function<PairType, typename PairType::second_type>
186 #if defined(XALAN_NO_STD_NAMESPACE)
187 typedef unary_function<PairType, PairType::second_type>
BaseClassType;
189 typedef std::unary_function<PairType, typename PairType::second_type>
BaseClassType;
206 return thePair.second;
217 template <
class Type>
218 #if defined(XALAN_NO_STD_NAMESPACE)
224 #if defined(XALAN_NO_STD_NAMESPACE)
254 #if defined(XALAN_NO_STD_NAMESPACE)
260 #if defined(XALAN_NO_STD_NAMESPACE)
261 typedef unary_function<const typename T::value_type&, void>
BaseClassType;
263 typedef std::unary_function<const typename T::value_type&, void>
BaseClassType;
270 m_memoryManager(theManager)
293 template<
class MapType>
312 #if defined(XALAN_NO_STD_NAMESPACE)
318 #if defined(XALAN_NO_STD_NAMESPACE)
319 typedef binary_function<const T*, const T*, bool>
BaseClassType;
341 while(*theLHS && *theRHS)
343 if (*theLHS != *theRHS)
354 return *theLHS < *theRHS ?
true :
false;
363 typedef XALAN_STD_QUALIFIER binary_function<const T*, const T*, bool>
BaseClassType;
381 while(*theLHS && *theRHS)
383 if (*theLHS != *theRHS)
394 if (*theLHS || *theRHS)
418 const T* theRawBuffer = theKey;
422 while (*theRawBuffer)
424 theHashValue = 5 * theHashValue + *theRawBuffer;
428 return ++theHashValue;
443 template<
class CollectionType>
449 m_collection(&theCollection)
455 if (m_collection != 0)
457 m_collection->clear();
476 CollectionType* m_collection;
481 template<
class CollectionType,
class DeleteFunctorType>
487 m_collection(&theCollection)
493 if (m_collection != 0)
495 #if !defined(XALAN_NO_STD_NAMESPACE)
500 for_each(m_collection->begin(),
502 DeleteFunctorType(m_collection->getMemoryManager()));
521 CollectionType* m_collection;
527 #if defined(XALAN_NO_STD_NAMESPACE)
528 struct pointer_equals :
public binary_function<const T*, const T*, bool>
533 #if defined(XALAN_NO_STD_NAMESPACE)
534 typedef binary_function<const T*, const T*, bool>
BaseClassType;
548 assert(theLHS != 0 && theRHS != 0);
550 return *theLHS == *theRHS;
557 #if defined(XALAN_NO_STD_NAMESPACE)
563 #if defined(XALAN_NO_STD_NAMESPACE)
581 assert(theOther != 0);
583 return *theOther == *m_arg;
594 #if defined(XALAN_NO_STD_NAMESPACE)
595 struct pointer_less :
public binary_function<const T*, const T*, bool>
597 struct
pointer_less :
public std::binary_function<const T*, const T*, bool>
600 #if defined(XALAN_NO_STD_NAMESPACE)
601 typedef binary_function<const T*, const T*, bool>
BaseClassType;
615 assert(theLHS != 0 && theRHS != 0);
617 #if !defined(XALAN_NO_STD_NAMESPACE)
621 return less<T>()(*theLHS, *theRHS);
628 struct pointer_equal :
public XALAN_STD_QUALIFIER binary_function<const T*, const T*, bool>
630 typedef XALAN_STD_QUALIFIER binary_function<const T*, const T*, bool>
BaseClassType;
641 assert(theLHS != 0 && theRHS != 0);
642 return XALAN_STD_QUALIFIER equal_to<T>()(*theLHS, *theRHS);
649 XALAN_CPP_NAMESPACE_END
653 #endif // STLHELPERS_HEADER_GUARD_1357924680