diff options
Diffstat (limited to 'ace/Functor_T.h')
-rw-r--r-- | ace/Functor_T.h | 48 |
1 files changed, 20 insertions, 28 deletions
diff --git a/ace/Functor_T.h b/ace/Functor_T.h index 238cea27650..5cfd4a5601f 100644 --- a/ace/Functor_T.h +++ b/ace/Functor_T.h @@ -10,25 +10,26 @@ // Functor_T.h // // = DESCRIPTION -// Templatized classes for implementing function objects that are used in -// various places in ACE. There are currently two major categories of -// function objects in ACE: GOF Command Pattern objects, and STL-style -// functors for comparison of container elements. The command objects -// are invoked via an execute () method, while the STL-style functors are -// invoked via an operator() () method. +// Templatized classes for implementing function objects that are +// used in various places in ACE. There are currently two major +// categories of function objects in ACE: GOF Command Pattern +// objects, and STL-style functors for comparison of container +// elements. The command objects are invoked via an <execute> +// method, while the STL-style functors are invoked via an +// <operator()> method. // // = AUTHOR -// Chris Gill <cdgill@cs.wustl.edu> +// Chris Gill <cdgill@cs.wustl.edu> // // Based on Command Pattern implementations originally done by // -// Carlos O'Ryan <coryan@cs.wustl.edu> and -// Douglas C. Schmidt <schmidt@cs.wustl.edu> and -// Sergio Flores-Gaitan <sergio@cs.wustl.edu> +// Carlos O'Ryan <coryan@cs.wustl.edu>, +// Douglas C. Schmidt <schmidt@cs.wustl.edu>, and +// Sergio Flores-Gaitan <sergio@cs.wustl.edu> // -// and on STL-style functor implementations originally done by +// and on STL-style functor implementations originally done by // -// Irfan Pyarali <irfan@cs.wustl.edu> +// Irfan Pyarali <irfan@cs.wustl.edu> // // ============================================================================ @@ -49,9 +50,9 @@ template <class RECEIVER, class ACTION> class ACE_Command_Callback : public ACE_Command_Base { // = TITLE - // Defines a class template that allows us to invoke a GOF command style - // callback to an object without knowing anything about the object except - // its type. + // Defines a class template that allows us to invoke a GOF + // command style callback to an object without knowing anything + // about the object except its type. // // = DESCRIPTION // This class declares an interface to execute operations, @@ -59,19 +60,17 @@ class ACE_Command_Callback : public ACE_Command_Base // how to implement the operation. A class can invoke operations // without knowing anything about it, or how it was implemented. public: - ACE_Command_Callback (RECEIVER &recvr, ACTION action); // Constructor: sets the <receiver_> of the Command to recvr, and the // <action_> of the Command to <action>. - virtual ~ACE_Command_Callback (void) {} + virtual ~ACE_Command_Callback (void); // Virtual destructor. virtual int execute (void *arg = 0); // Invokes the method <action_> from the object <receiver_>. private: - RECEIVER &receiver_; // Object where the method resides. @@ -87,9 +86,7 @@ template <class TYPE> class ACE_Hash { // = TITLE - // // Function object for hashing - // public: u_long operator () (const TYPE &t) const; // Simply calls t.hash () @@ -99,9 +96,7 @@ template <class TYPE> class ACE_Pointer_Hash { // = TITLE - // // Function object for hashing pointers - // public: u_long operator () (TYPE t) const; // Simply returns t. @@ -111,10 +106,8 @@ template <class TYPE> class ACE_Equal_To { // = TITLE - // // Function object for comparing two objects of // the given type for equality. - // public: int operator () (const TYPE &lhs, const TYPE &rhs) const; @@ -125,10 +118,9 @@ template <class TYPE> class ACE_Less_Than { // = TITLE - // - // Function object for determining whether the first object of the - // given type is less than the second object of the same type. - // + // Function object for determining whether the first object of + // the given type is less than the second object of the same + // type. public: int operator () (const TYPE &lhs, const TYPE &rhs) const; |