Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

Functor_T.cpp

Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 // $Id: Functor_T.cpp,v 1.1.1.3 2001/12/04 14:33:01 chad Exp $
00003 
00004 #ifndef ACE_FUNCTOR_T_C
00005 #define ACE_FUNCTOR_T_C
00006 
00007 #include "ace/Functor_T.h"
00008 
00009 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00010 # pragma once
00011 #endif /* ACE_LACKS_PRAGMA_ONCE */
00012 
00013 #if !defined (__ACE_INLINE__)
00014 #include "ace/Functor_T.i"
00015 #endif /* __ACE_INLINE__ */
00016 
00017 ACE_RCSID(ace, Functor_T, "$Id: Functor_T.cpp,v 1.1.1.3 2001/12/04 14:33:01 chad Exp $")
00018 
00019 ACE_ALLOC_HOOK_DEFINE(ACE_Command_Callback)
00020 
00021 ///////////////////////////////////
00022 // GOF Command Pattern Templates //
00023 ///////////////////////////////////
00024 
00025 // Constructor.
00026 
00027 template <class RECEIVER, class ACTION>
00028 ACE_Command_Callback<RECEIVER, ACTION>::ACE_Command_Callback (RECEIVER &recvr,
00029                                     ACTION action)
00030   : receiver_ (recvr),
00031     action_ (action)
00032 {
00033 }
00034 
00035 template <class RECEIVER, class ACTION>
00036 ACE_Command_Callback<RECEIVER, ACTION>::~ACE_Command_Callback (void)
00037 {
00038 }
00039 
00040 // Invokes an operation.
00041 
00042 template <class RECEIVER, class ACTION> int
00043 ACE_Command_Callback<RECEIVER, ACTION>::execute (void *arg)
00044 {
00045   return (receiver_.*action_) (arg);
00046 }
00047 
00048 
00049 #endif /* ACE_FUNCTOR_T_C */

Generated on Mon Jun 16 11:19:44 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002