Functor_T.cpp

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

Generated on Thu Nov 9 09:41:51 2006 for ACE by doxygen 1.3.6