ACE 8.0.5
Loading...
Searching...
No Matches
ACE_Member_Function_Command< RECEIVER > Class Template Reference

Defines a class template that allows us to invoke a member function using the GoF command style callback. More...

#include <Functor_T.h>

Inheritance diagram for ACE_Member_Function_Command< RECEIVER >:
Collaboration diagram for ACE_Member_Function_Command< RECEIVER >:

Public Types

typedef void(RECEIVER::* PTMF) ()

Public Member Functions

 ACE_Member_Function_Command (RECEIVER &recvr, PTMF ptmf)
virtual ~ACE_Member_Function_Command ()=default
 Virtual destructor.
virtual int execute (void *)
Public Member Functions inherited from ACE_Command_Base
 ACE_Command_Base ()
 Default constructor.
virtual ~ACE_Command_Base ()=default
 Virtual destructor.

Private Attributes

RECEIVER & receiver_
 Object where the method resides.
PTMF ptmf_
 Method that is going to be invoked.

Detailed Description

template<class RECEIVER>
class ACE_Member_Function_Command< RECEIVER >

Defines a class template that allows us to invoke a member function using the GoF command style callback.

Member Typedef Documentation

◆ PTMF

template<class RECEIVER>
typedef void(RECEIVER::* ACE_Member_Function_Command< RECEIVER >::PTMF) ()

Constructor & Destructor Documentation

◆ ACE_Member_Function_Command()

template<class RECEIVER>
ACE_Member_Function_Command< RECEIVER >::ACE_Member_Function_Command ( RECEIVER & recvr,
PTMF ptmf )
inline

Con Constructor: sets the <receiver_> of the Command to recvr, and the <action_> of the Command to <action>.

◆ ~ACE_Member_Function_Command()

template<class RECEIVER>
virtual ACE_Member_Function_Command< RECEIVER >::~ACE_Member_Function_Command ( )
virtualdefault

Virtual destructor.

Member Function Documentation

◆ execute()

template<class RECEIVER>
int ACE_Member_Function_Command< RECEIVER >::execute ( void * )
inlinevirtual

Invokes the method <action_> from the object <receiver_>. The parameter is ignored

Implements ACE_Command_Base.

Member Data Documentation

◆ ptmf_

template<class RECEIVER>
PTMF ACE_Member_Function_Command< RECEIVER >::ptmf_
private

Method that is going to be invoked.

◆ receiver_

template<class RECEIVER>
RECEIVER& ACE_Member_Function_Command< RECEIVER >::receiver_
private

Object where the method resides.


The documentation for this class was generated from the following files: