Document return values
[ACE_TAO.git] / ACE / ace / Functor_T.cpp
blob6419d7863053d9e7a7c06fa9220a86468d66837b
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.
27 template <class RECEIVER, class ACTION>
28 ACE_Command_Callback<RECEIVER, ACTION>::ACE_Command_Callback (RECEIVER &recvr,
29 ACTION action)
30 : receiver_ (recvr),
31 action_ (action)
35 // Invokes an operation.
36 template <class RECEIVER, class ACTION> int
37 ACE_Command_Callback<RECEIVER, ACTION>::execute (void *arg)
39 return (receiver_.*action_) (arg);
42 ACE_END_VERSIONED_NAMESPACE_DECL
44 #endif /* ACE_FUNCTOR_T_CPP */