summaryrefslogtreecommitdiff
path: root/ace/Functor_T.i
diff options
context:
space:
mode:
authorcdgill <cdgill@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-11-16 23:54:19 +0000
committercdgill <cdgill@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-11-16 23:54:19 +0000
commit8c22336bb9544e7227d3847986ecd20e031c9a2f (patch)
tree602f34efa65df133129f750454f2c9e09f6cc901 /ace/Functor_T.i
parentf226d4e96b1c27a75a1dcabcb39f5317b799f97e (diff)
downloadATCD-8c22336bb9544e7227d3847986ecd20e031c9a2f.tar.gz
Added test, less than functor, better comments, etc. to RB_Tree class
Diffstat (limited to 'ace/Functor_T.i')
-rw-r--r--ace/Functor_T.i18
1 files changed, 18 insertions, 0 deletions
diff --git a/ace/Functor_T.i b/ace/Functor_T.i
index 6bb3fdeccce..01b93b3dfca 100644
--- a/ace/Functor_T.i
+++ b/ace/Functor_T.i
@@ -26,5 +26,23 @@
// ============================================================================
+// Invokes the less than function object.
+
+template <class OPERAND1, class OPERAND2> ACE_INLINE int
+ACE_Less_Than_Functor<OPERAND1, OPERAND2>::execute (const OPERAND1 &operand1,
+ const OPERAND2 &operand2)
+{
+ return (operand1 < operand2) ? 1 : 0;
+}
+
+// Creates another object of the same type.
+
+template <class OPERAND1, class OPERAND2> ACE_INLINE
+ACE_Const_Binary_Functor_Base<OPERAND1, OPERAND2> *
+ACE_Less_Than_Functor<OPERAND1, OPERAND2>::clone ()
+{
+ return new ACE_Less_Than_Functor<OPERAND1, OPERAND2>;
+}
+
// EOF