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
std::binary_function< const T *, const T *, bool > BaseClassType
Definition: STLHelper.hpp:603
Definition: STLHelper.hpp:628
Definition: STLHelper.hpp:444
BaseClassType::argument_type argument_type
Definition: STLHelper.hpp:111
Functor to retrieve the value of a key-value pair in a map, used in STL iteration algorithms...
Definition: STLHelper.hpp:183
Functor to call a clear() member function on its argument.
Definition: STLHelper.hpp:221
result_type operator()(first_argument_type theLHS, second_argument_type theRHS) const
Compare the values of two objects.
Definition: STLHelper.hpp:377
result_type operator()(argument_type theOther) const
Definition: STLHelper.hpp:578
Functor to delete value objects in maps, used in STL iteration algorithms.
Definition: STLHelper.hpp:257
void operator()(Type &theArg)
Definition: STLHelper.hpp:44
XALAN_CPP_NAMESPACE_BEGIN typedef XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager MemoryManagerType
Definition: XalanMemoryManagement.hpp:39
BaseClassType::result_type result_type
Definition: STLHelper.hpp:110
std::unary_function< Type, void > BaseClassType
Definition: STLHelper.hpp:227
BaseClassType::second_argument_type second_argument_type
Definition: STLHelper.hpp:608
BaseClassType::argument_type argument_type
Definition: STLHelper.hpp:413
BaseClassType::first_argument_type first_argument_type
Definition: STLHelper.hpp:366
This functor is designed to compare 0-terminated arrays.
Definition: STLHelper.hpp:315
Definition: STLHelper.hpp:361
BaseClassType::first_argument_type first_argument_type
Definition: STLHelper.hpp:633
BaseClassType::argument_type argument_type
Definition: STLHelper.hpp:267
~CollectionDeleteGuard()
Definition: STLHelper.hpp:491
std::unary_function< const Type *, void > BaseClassType
Definition: STLHelper.hpp:107
std::unary_function< PairType, typename PairType::second_type > BaseClassType
Definition: STLHelper.hpp:189
equal_null_terminated_arrays< XalanDOMChar > Comparator
Definition: STLHelper.hpp:438
Definition: STLHelper.hpp:482
XALAN_STD_QUALIFIER unary_function< const T *, size_t > BaseClassType
Definition: STLHelper.hpp:410
BaseClassType::second_argument_type second_argument_type
Definition: STLHelper.hpp:326
void operator()(const Type *theArg, MemoryManagerType &theMemoryManager)
Definition: STLHelper.hpp:75
PairType value_type
Definition: STLHelper.hpp:158
Definition: XalanMap.hpp:66
Functor to retrieve the key of a key-value pair in a map, used in STL iteration algorithms.
Definition: STLHelper.hpp:146
result_type operator()(argument_type thePointer) const
Delete the object pointed to by argument.
Definition: STLHelper.hpp:124
BaseClassType::second_argument_type second_argument_type
Definition: STLHelper.hpp:634
result_type operator()(argument_type thePair) const
Delete the value object in a map value pair.
Definition: STLHelper.hpp:281
result_type operator()(first_argument_type theLHS, second_argument_type theRHS) const
Definition: STLHelper.hpp:611
MapValueDeleteFunctor(MemoryManagerType &theManager)
Definition: STLHelper.hpp:269
std::unary_function< PairType, typename PairType::first_type > BaseClassType
Definition: STLHelper.hpp:152
BaseClassType::result_type result_type
Definition: STLHelper.hpp:192
hash_null_terminated_arrays< XalanDOMChar > Hasher
Definition: STLHelper.hpp:437
void operator()(Type *theArg, MemoryManagerType &theMemoryManager)
Definition: STLHelper.hpp:62
BaseClassType::result_type result_type
Definition: STLHelper.hpp:324
BaseClassType::argument_type argument_type
Definition: STLHelper.hpp:156
Definition: STLHelper.hpp:597
void release()
Definition: STLHelper.hpp:507
std::unary_function< const typename T::value_type &, void > BaseClassType
Definition: STLHelper.hpp:263
BaseClassType::result_type result_type
Definition: STLHelper.hpp:606
BaseClassType::argument_type argument_type
Definition: STLHelper.hpp:193
result_type operator()(const argument_type &thePair) const
Retrieve the key of a key-value pair.
Definition: STLHelper.hpp:167
BaseClassType::first_argument_type first_argument_type
Definition: STLHelper.hpp:540
result_type operator()(first_argument_type theLHS, second_argument_type theRHS) const
Definition: STLHelper.hpp:544
Definition: STLHelper.hpp:560
result_type operator()(first_argument_type theLHS, second_argument_type theRHS) const
Definition: STLHelper.hpp:637
XalanDestroyFunctor< Type > makeXalanDestroyFunctor(const Type *)
Definition: STLHelper.hpp:87
Functor to delete objects, used in STL iteration algorithms.
Definition: STLHelper.hpp:101
void operator()(Type *theArg)
Definition: STLHelper.hpp:50
XALAN_STD_QUALIFIER binary_function< const T *, const T *, bool > BaseClassType
Definition: STLHelper.hpp:363
Definition: STLHelper.hpp:408
std::binary_function< const T *, const T *, bool > BaseClassType
Definition: STLHelper.hpp:536
XALAN_STD_QUALIFIER binary_function< const T *, const T *, bool > BaseClassType
Definition: STLHelper.hpp:630
BaseClassType::argument_type argument_type
Definition: STLHelper.hpp:570
MapValueDeleteFunctor< MapType > makeMapValueDeleteFunctor(MapType &theMap)
Definition: STLHelper.hpp:295
~CollectionClearGuard()
Definition: STLHelper.hpp:453
BaseClassType::result_type result_type
Definition: STLHelper.hpp:632
result_type operator()(argument_type theKey) const
Definition: STLHelper.hpp:416
Definition: STLHelper.hpp:40
CollectionDeleteGuard(CollectionType &theCollection)
Definition: STLHelper.hpp:486
BaseClassType::argument_type argument_type
Definition: STLHelper.hpp:231
result_type operator()(argument_type &theArg) const
Retrieve the value of a key-value pair.
Definition: STLHelper.hpp:242
BaseClassType::first_argument_type first_argument_type
Definition: STLHelper.hpp:607
BaseClassType::result_type result_type
Definition: STLHelper.hpp:155
result_type operator()(const argument_type &thePair) const
Retrieve the value of a key-value pair.
Definition: STLHelper.hpp:204
BaseClassType::result_type result_type
Definition: STLHelper.hpp:365
BaseClassType::result_type result_type
Definition: STLHelper.hpp:266
BaseClassType::second_argument_type second_argument_type
Definition: STLHelper.hpp:367
BaseClassType::first_argument_type first_argument_type
Definition: STLHelper.hpp:325
Definition: STLHelper.hpp:530
std::binary_function< const T *, const T *, bool > BaseClassType
Definition: STLHelper.hpp:321
BaseClassType::result_type result_type
Definition: STLHelper.hpp:569
std::unary_function< const T *, bool > BaseClassType
Definition: STLHelper.hpp:566
BaseClassType::result_type result_type
Definition: STLHelper.hpp:539
BaseClassType::result_type result_type
Definition: STLHelper.hpp:230
pointer_equals_predicate(argument_type theArg)
Definition: STLHelper.hpp:572
CollectionClearGuard(CollectionType &theCollection)
Definition: STLHelper.hpp:448
BaseClassType::second_argument_type second_argument_type
Definition: STLHelper.hpp:541
PairType value_type
Definition: STLHelper.hpp:195
BaseClassType::result_type result_type
Definition: STLHelper.hpp:412
DeleteFunctor(MemoryManagerType &theManager)
Definition: STLHelper.hpp:113
void operator()(const Type *theArg)
Definition: STLHelper.hpp:56
void release()
Definition: STLHelper.hpp:462
result_type operator()(first_argument_type theLHS, second_argument_type theRHS) const
Compare the values of two objects.
Definition: STLHelper.hpp:337
Type value_type
Definition: STLHelper.hpp:233