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;
340 first_argument_type theLHS,
341 second_argument_type theRHS)
const 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;
380 first_argument_type theLHS,
381 second_argument_type theRHS)
const 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);
430 argument_type theKey,
431 result_type theLength,
432 result_type theInitialValue = 0)
const 434 result_type theHashValue = theInitialValue;
436 const argument_type theEnd =
439 while (theKey != theEnd)
446 return ++theHashValue;
462 argument_type theKey,
463 result_type theInitialValue = 0)
const 465 result_type theHashValue = theInitialValue;
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;
591 first_argument_type theLHS,
592 second_argument_type theRHS)
const 594 assert(theLHS != 0 && theRHS != 0);
596 return *theLHS == *theRHS;
603 #if defined(XALAN_NO_STD_NAMESPACE) 609 #if defined(XALAN_NO_STD_NAMESPACE) 625 argument_type theOther)
const 627 assert(theOther != 0);
629 return *theOther == *m_arg;
634 const argument_type 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;
658 first_argument_type theLHS,
659 second_argument_type theRHS)
const 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;
684 first_argument_type theLHS,
685 second_argument_type theRHS)
const 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 std::binary_function< const T *, const T *, bool > BaseClassType
BaseClassType::argument_type argument_type
result_type operator()(first_argument_type theLHS, second_argument_type theRHS) const
Functor to retrieve the value of a key-value pair in a map, used in STL iteration algorithms...
Functor to call a clear() member function on its argument.
MapValueDeleteFunctor(MemoryManager &theManager)
Functor to delete value objects in maps, used in STL iteration algorithms.
void operator()(Type &theArg)
BaseClassType::result_type result_type
std::unary_function< Type, void > BaseClassType
result_type operator()(argument_type thePair) const
Delete the value object in a map value pair.
BaseClassType::second_argument_type second_argument_type
XALAN_STD_QUALIFIER unary_function< const T *, size_t > BaseClassType
hash_null_terminated_array< XalanDOMChar > Hasher
BaseClassType::first_argument_type first_argument_type
This functor is designed to compare 0-terminated arrays.
BaseClassType::first_argument_type first_argument_type
BaseClassType::argument_type argument_type
result_type operator()(argument_type theOther) const
std::unary_function< const Type *, void > BaseClassType
std::unary_function< PairType, typename PairType::second_type > BaseClassType
equal_null_terminated_arrays< XalanDOMChar > Comparator
result_type operator()(first_argument_type theLHS, second_argument_type theRHS) const
BaseClassType::second_argument_type second_argument_type
result_type operator()(argument_type thePointer) const
Delete the object pointed to by argument.
Functor to retrieve the key of a key-value pair in a map, used in STL iteration algorithms.
BaseClassType::argument_type argument_type
BaseClassType::second_argument_type second_argument_type
std::unary_function< PairType, typename PairType::first_type > BaseClassType
BaseClassType::result_type result_type
result_type operator()(first_argument_type theLHS, second_argument_type theRHS) const
Compare the values of two objects.
BaseClassType::result_type result_type
result_type operator()(first_argument_type theLHS, second_argument_type theRHS) const
BaseClassType::argument_type argument_type
BaseClassType::argument_type argument_type
result_type operator()(const argument_type &thePair) const
Retrieve the value of a key-value pair.
BaseClassType::result_type result_type
std::unary_function< const typename T::value_type &, void > BaseClassType
BaseClassType::result_type result_type
BaseClassType::argument_type argument_type
BaseClassType::first_argument_type first_argument_type
result_type operator()(const argument_type &thePair) const
Retrieve the key of a key-value pair.
DeleteFunctor(MemoryManager &theManager)
XalanDestroyFunctor< Type > makeXalanDestroyFunctor(const Type *)
Functor to delete objects, used in STL iteration algorithms.
void operator()(Type *theArg)
XALAN_STD_QUALIFIER binary_function< const T *, const T *, bool > BaseClassType
XALAN_CPP_NAMESPACE_BEGIN typedef size_t size_type
std::binary_function< const T *, const T *, bool > BaseClassType
XALAN_STD_QUALIFIER binary_function< const T *, const T *, bool > BaseClassType
BaseClassType::argument_type argument_type
MapValueDeleteFunctor< MapType > makeMapValueDeleteFunctor(MapType &theMap)
BaseClassType::result_type result_type
size_t XalanScalarHash(ScalarType theValue, size_t theResult)
CollectionDeleteGuard(CollectionType &theCollection)
BaseClassType::argument_type argument_type
BaseClassType::first_argument_type first_argument_type
BaseClassType::result_type result_type
BaseClassType::result_type result_type
void operator()(Type *theArg, MemoryManager &theMemoryManager)
BaseClassType::result_type result_type
BaseClassType::second_argument_type second_argument_type
BaseClassType::first_argument_type first_argument_type
XALAN_STD_QUALIFIER unary_function< const T *, size_t > BaseClassType
std::binary_function< const T *, const T *, bool > BaseClassType
BaseClassType::result_type result_type
BaseClassType::result_type result_type
std::unary_function< const T *, bool > BaseClassType
BaseClassType::result_type result_type
BaseClassType::result_type result_type
pointer_equals_predicate(argument_type theArg)
CollectionClearGuard(CollectionType &theCollection)
BaseClassType::second_argument_type second_argument_type
result_type operator()(first_argument_type theLHS, second_argument_type theRHS) const
Compare the values of two objects.
void operator()(const Type *theArg, MemoryManager &theMemoryManager)
void operator()(const Type *theArg)
result_type operator()(argument_type &theArg) const
Retrieve the value of a key-value pair.