[7297] Fixed profession spells sorting in trainer spell list at client.
[getmangos.git] / dep / ACE_wrappers / ace / Functor_String.h
blob6070fcf1bea03089221c82b6da9bc49cc038209e
1 // -*- C++ -*-
3 //==========================================================================
4 /**
5 * @file Functor_String.h
7 * $Id: Functor_String.h 80826 2008-03-04 14:51:23Z wotte $
9 * Class template specializations for ACE_*String types implementing
10 * function objects that are used in various places in ATC. They
11 * could be placed in Functor.h. But we don't want to couple string
12 * types to the rest of ACE+TAO. Hence they are placed in a seperate
13 * file.
15 //==========================================================================
16 #ifndef ACE_FUNCTOR_STRING_H
17 #define ACE_FUNCTOR_STRING_H
18 #include /**/ "ace/pre.h"
20 #include /**/ "ace/config-all.h"
22 #if !defined (ACE_LACKS_PRAGMA_ONCE)
23 # pragma once
24 #endif /* ACE_LACKS_PRAGMA_ONCE */
26 #include /**/ "ace/ACE_export.h"
27 #include "ace/SStringfwd.h"
29 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
31 ////////////////////////////////////////////////////////////
32 // STL-style Functor Classes and Template Specializations //
33 ////////////////////////////////////////////////////////////
35 // Forward declaration since we are going to specialize that template
36 // here. The template itself requires this file so every user of the
37 // template should also see the specialization.
38 template <class TYPE> class ACE_Hash;
39 template <class TYPE> class ACE_Equal_To;
40 template <class TYPE> class ACE_Less_Than;
42 /**
43 * @class ACE_Equal_To<ACE_CString>
45 * @brief Function object for determining whether two ACE_CStrings are
46 * equal.
48 template<>
49 class ACE_Export ACE_Equal_To<ACE_CString>
51 public:
52 int operator () (const ACE_CString &lhs,
53 const ACE_CString &rhs) const;
57 /**
58 * @class ACE_Hash<ACE_CString>
60 * @brief Function object for hashing a ACE_CString
62 template<>
63 class ACE_Export ACE_Hash<ACE_CString>
65 public:
66 /// Calls ACE::hash_pjw
67 unsigned long operator () (const ACE_CString &lhs) const;
71 /**
72 * @class ACE_Less_Than<ACE_CString>
74 * @brief Function object for determining whether the first const string
75 * is less than the second const string.
77 template<>
78 class ACE_Export ACE_Less_Than<ACE_CString>
80 public:
81 /// Simply calls ACE_OS::strcmp
82 int operator () (const ACE_CString &lhs,
83 const ACE_CString &rhs) const;
87 #if defined (ACE_USES_WCHAR)
89 /**
90 * @class ACE_Equal_To<ACE_WString>
92 * @brief Function object for determining whether two ACE_CStrings are
93 * equal.
95 template<>
96 class ACE_Export ACE_Equal_To<ACE_WString>
98 public:
99 int operator () (const ACE_WString &lhs,
100 const ACE_WString &rhs) const;
105 * @class ACE_Hash<ACE_WString>
107 * @brief Function object for hashing a ACE_WString
109 template<>
110 class ACE_Export ACE_Hash<ACE_WString>
112 public:
113 /// Calls ACE::hash_pjw
114 unsigned long operator () (const ACE_WString &lhs) const;
118 * @class ACE_Less_Than<ACE_WString>
120 * @brief Function object for determining whether the first const string
121 * is less than the second const string.
123 template<>
124 class ACE_Export ACE_Less_Than<ACE_WString>
126 public:
127 /// Simply calls ACE_OS::strcmp
128 int operator () (const ACE_WString &lhs,
129 const ACE_WString &rhs) const;
132 #endif /*ACE_USES_WCHAR*/
134 ACE_END_VERSIONED_NAMESPACE_DECL
136 #if defined (__ACE_INLINE__)
137 #include "ace/Functor_String.inl"
138 #endif /* __ACE_INLINE__ */
140 #include /**/ "ace/post.h"
141 #endif /*ACE_FUNCTOR_STRING_H*/