aboutsummaryrefslogtreecommitdiff
path: root/externals/ace/Functor_String.h
diff options
context:
space:
mode:
authorXanadu <none@none>2010-07-20 02:49:28 +0200
committerXanadu <none@none>2010-07-20 02:49:28 +0200
commit79622802f397258ee0f34327ba3ae6977ca3e7ff (patch)
tree1868946c234ab9ee256a6b7766a15713eae94235 /externals/ace/Functor_String.h
parent7dd2dc91816ab8b3bc3b99a1b1c99c7ea314d5a8 (diff)
parentf906976837502fa5aa81b982b901d1509f5aa0c4 (diff)
Merge. Revision history for source files should be all back now.
--HG-- branch : trunk rename : sql/CMakeLists.txt => sql/tools/CMakeLists.txt rename : src/server/game/Pools/PoolHandler.cpp => src/server/game/Pools/PoolMgr.cpp rename : src/server/game/Pools/PoolHandler.h => src/server/game/Pools/PoolMgr.h rename : src/server/game/PrecompiledHeaders/NixCorePCH.cpp => src/server/game/PrecompiledHeaders/gamePCH.cpp rename : src/server/game/PrecompiledHeaders/NixCorePCH.h => src/server/game/PrecompiledHeaders/gamePCH.h
Diffstat (limited to 'externals/ace/Functor_String.h')
-rw-r--r--externals/ace/Functor_String.h129
1 files changed, 129 insertions, 0 deletions
diff --git a/externals/ace/Functor_String.h b/externals/ace/Functor_String.h
new file mode 100644
index 00000000000..2adf561a65f
--- /dev/null
+++ b/externals/ace/Functor_String.h
@@ -0,0 +1,129 @@
+// -*- C++ -*-
+
+//==========================================================================
+/**
+ * @file Functor_String.h
+ *
+ * $Id: Functor_String.h 86698 2009-09-13 15:58:17Z johnnyw $
+ *
+ * Class template specializations for ACE_*String types implementing
+ * function objects that are used in various places in ATC. They
+ * could be placed in Functor.h. But we don't want to couple string
+ * types to the rest of ACE+TAO. Hence they are placed in a seperate
+ * file.
+ */
+//==========================================================================
+#ifndef ACE_FUNCTOR_STRING_H
+#define ACE_FUNCTOR_STRING_H
+#include /**/ "ace/pre.h"
+
+#include /**/ "ace/config-all.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include /**/ "ace/ACE_export.h"
+#include "ace/SStringfwd.h"
+
+ACE_BEGIN_VERSIONED_NAMESPACE_DECL
+
+////////////////////////////////////////////////////////////
+// STL-style Functor Classes and Template Specializations //
+////////////////////////////////////////////////////////////
+
+// Forward declaration since we are going to specialize that template
+// here. The template itself requires this file so every user of the
+// template should also see the specialization.
+template <class TYPE> class ACE_Hash;
+template <class TYPE> class ACE_Equal_To;
+template <class TYPE> class ACE_Less_Than;
+
+/**
+ * @brief Function object for determining whether two ACE_CStrings are
+ * equal.
+ */
+template<>
+class ACE_Export ACE_Equal_To<ACE_CString>
+{
+public:
+ int operator () (const ACE_CString &lhs,
+ const ACE_CString &rhs) const;
+};
+
+
+/**
+ * @brief Function object for hashing a ACE_CString
+ */
+template<>
+class ACE_Export ACE_Hash<ACE_CString>
+{
+public:
+ /// Calls ACE::hash_pjw
+ unsigned long operator () (const ACE_CString &lhs) const;
+};
+
+
+/**
+ * @brief Function object for determining whether the first const string
+ * is less than the second const string.
+ */
+template<>
+class ACE_Export ACE_Less_Than<ACE_CString>
+{
+public:
+ /// Simply calls ACE_OS::strcmp
+ int operator () (const ACE_CString &lhs,
+ const ACE_CString &rhs) const;
+};
+
+
+#if defined (ACE_USES_WCHAR)
+
+/**
+ * @brief Function object for determining whether two ACE_WStrings are
+ * equal.
+ */
+template<>
+class ACE_Export ACE_Equal_To<ACE_WString>
+{
+public:
+ int operator () (const ACE_WString &lhs,
+ const ACE_WString &rhs) const;
+};
+
+
+/**
+ * @brief Function object for hashing a ACE_WString
+ */
+template<>
+class ACE_Export ACE_Hash<ACE_WString>
+{
+public:
+ /// Calls ACE::hash_pjw
+ unsigned long operator () (const ACE_WString &lhs) const;
+};
+
+/**
+ * @brief Function object for determining whether the first const wstring
+ * is less than the second const wstring.
+ */
+template<>
+class ACE_Export ACE_Less_Than<ACE_WString>
+{
+public:
+ /// Simply calls ACE_OS::strcmp
+ int operator () (const ACE_WString &lhs,
+ const ACE_WString &rhs) const;
+};
+
+#endif /*ACE_USES_WCHAR*/
+
+ACE_END_VERSIONED_NAMESPACE_DECL
+
+#if defined (__ACE_INLINE__)
+#include "ace/Functor_String.inl"
+#endif /* __ACE_INLINE__ */
+
+#include /**/ "ace/post.h"
+#endif /*ACE_FUNCTOR_STRING_H*/