summaryrefslogtreecommitdiff
path: root/ACE/ace/Functor_String.h
diff options
context:
space:
mode:
authorhillj <hillj@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2011-02-18 22:21:16 +0000
committerhillj <hillj@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2011-02-18 22:21:16 +0000
commit517e8e0fb89f471973533bb2257c83293ac7c2b3 (patch)
treeca99d2c22905e922513f29b7bb7f23732b2f6a6a /ACE/ace/Functor_String.h
parent61b7747f6c81b647009dd1fb668cf3dece19e914 (diff)
downloadATCD-517e8e0fb89f471973533bb2257c83293ac7c2b3.tar.gz
Fri Feb 18 22:20:42 UTC 2011 James H. Hill <hillj at cs dot iupui dot edu>
Diffstat (limited to 'ACE/ace/Functor_String.h')
-rw-r--r--ACE/ace/Functor_String.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/ACE/ace/Functor_String.h b/ACE/ace/Functor_String.h
index 1b9d8f90d6d..5a35e68d9d7 100644
--- a/ACE/ace/Functor_String.h
+++ b/ACE/ace/Functor_String.h
@@ -25,6 +25,7 @@
#include /**/ "ace/ACE_export.h"
#include "ace/SStringfwd.h"
+#include <string>
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
@@ -77,6 +78,44 @@ public:
const ACE_CString &rhs) const;
};
+/**
+ * @brief Function object for determining whether two std::strings are
+ * equal.
+ */
+template<>
+class ACE_Export ACE_Equal_To<std::string>
+{
+public:
+ int operator () (const std::string &lhs,
+ const std::string &rhs) const;
+};
+
+
+/**
+ * @brief Function object for hashing a std::string
+ */
+template<>
+class ACE_Export ACE_Hash<std::string>
+{
+public:
+ /// Calls ACE::hash_pjw
+ unsigned long operator () (const std::string &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<std::string>
+{
+public:
+ /// Simply calls std::string::compare
+ int operator () (const std::string &lhs,
+ const std::string &rhs) const;
+};
+
#if defined (ACE_USES_WCHAR)