/* -*- C++ -*- */ // $Id$ // ============================================================================ // // = LIBRARY // ace // // = FILENAME // Functor_T.i // // = DESCRIPTION // Inlinable method definitions for templatized classes // implementing the GOF Command Pattern, or STL-style functors. // // = AUTHOR // Chris Gill // // Based on Command Pattern implementations originally done by // // Carlos O'Ryan and // Douglas C. Schmidt and // Sergio Flores-Gaitan // // and on STL-style functor implementations originally done by // // Irfan Pyarali // // ============================================================================ ///////////////////////////////// // STL-style Functor Templates // ///////////////////////////////// template ACE_INLINE u_long ACE_Hash::operator () (const TYPE &t) const { return t.hash (); } template ACE_INLINE int ACE_Equal_To::operator () (const TYPE &lhs, const TYPE &rhs) const { return lhs == rhs; } template ACE_INLINE int ACE_Less_Than::operator () (const TYPE &lhs, const TYPE &rhs) const { return (lhs < rhs) ? 1 : 0; }