Fixed typos
[ACE_TAO.git] / ACE / ace / Functor_T.cpp
blob9b99c5029ee90c215c23ef11daaca4bedad484eb
1 #ifndef ACE_FUNCTOR_T_CPP
2 #define ACE_FUNCTOR_T_CPP
4 #include "ace/Functor_T.h"
6 #if defined (ACE_HAS_ALLOC_HOOKS)
7 # include "ace/Malloc_Base.h"
8 #endif /* ACE_HAS_ALLOC_HOOKS */
10 #if !defined (ACE_LACKS_PRAGMA_ONCE)
11 # pragma once
12 #endif /* ACE_LACKS_PRAGMA_ONCE */
14 #if !defined (__ACE_INLINE__)
15 #include "ace/Functor_T.inl"
16 #endif /* __ACE_INLINE__ */
18 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
20 ACE_ALLOC_HOOK_DEFINE_Tcc(ACE_Command_Callback)
22 ///////////////////////////////////
23 // GOF Command Pattern Templates //
24 ///////////////////////////////////
26 // Constructor.
28 template <class RECEIVER, class ACTION>
29 ACE_Command_Callback<RECEIVER, ACTION>::ACE_Command_Callback (RECEIVER &recvr,
30 ACTION action)
31 : receiver_ (recvr),
32 action_ (action)
36 template <class RECEIVER, class ACTION>
37 ACE_Command_Callback<RECEIVER, ACTION>::~ACE_Command_Callback (void)
41 // Invokes an operation.
43 template <class RECEIVER, class ACTION> int
44 ACE_Command_Callback<RECEIVER, ACTION>::execute (void *arg)
46 return (receiver_.*action_) (arg);
49 ACE_END_VERSIONED_NAMESPACE_DECL
51 #endif /* ACE_FUNCTOR_T_CPP */