GDCM 3.0.24
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
gdcm::MemberCommand< T > Class Template Reference

Command subclass that calls a pointer to a member function. More...

#include <gdcmCommand.h>

Inheritance diagram for gdcm::MemberCommand< T >:
[legend]
Collaboration diagram for gdcm::MemberCommand< T >:
[legend]

Public Types

typedef MemberCommand Self
 
typedef void(T::* TConstMemberFunctionPointer) (const Subject *, const Event &)
 
typedef void(T::* TMemberFunctionPointer) (Subject *, const Event &)
 

Public Member Functions

 MemberCommand (const Self &)=delete
 
void Execute (const Subject *caller, const Event &event) override
 
void Execute (Subject *caller, const Event &event) override
 
void operator= (const Self &)=delete
 
void SetCallbackFunction (T *object, TConstMemberFunctionPointer memberFunction)
 
void SetCallbackFunction (T *object, TMemberFunctionPointer memberFunction)
 
- Public Member Functions inherited from gdcm::Command
 Command (const Command &)=delete
 
void operator= (const Command &)=delete
 
- Public Member Functions inherited from gdcm::Subject
 Subject ()
 
 ~Subject () override
 
unsigned long AddObserver (const Event &event, Command *)
 
unsigned long AddObserver (const Event &event, Command *) const
 
CommandGetCommand (unsigned long tag)
 
bool HasObserver (const Event &event) const
 
void InvokeEvent (const Event &)
 
void InvokeEvent (const Event &) const
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
- Public Member Functions inherited from gdcm::Object
 Object ()
 
 Object (const Object &)
 Special requirement for copy/cstor, assignment operator.
 
virtual ~Object ()
 
void operator= (const Object &)
 
virtual void Print (std::ostream &) const
 

Static Public Member Functions

static SmartPointer< MemberCommandNew ()
 

Protected Member Functions

 MemberCommand ()
 
 ~MemberCommand () override=default
 
- Protected Member Functions inherited from gdcm::Command
 Command ()
 
 ~Command () override
 
- Protected Member Functions inherited from gdcm::Object
void Register ()
 
void UnRegister ()
 

Protected Attributes

TConstMemberFunctionPointer m_ConstMemberFunction
 
TMemberFunctionPointer m_MemberFunction
 
T * m_This
 

Detailed Description

template<class T>
class gdcm::MemberCommand< T >

Command subclass that calls a pointer to a member function.

MemberCommand calls a pointer to a member function with the same arguments as Execute on Command.

Member Typedef Documentation

◆ Self

template<class T >
typedef MemberCommand gdcm::MemberCommand< T >::Self

Standard class typedefs.

◆ TConstMemberFunctionPointer

template<class T >
typedef void(T::* gdcm::MemberCommand< T >::TConstMemberFunctionPointer) (const Subject *, const Event &)

◆ TMemberFunctionPointer

template<class T >
typedef void(T::* gdcm::MemberCommand< T >::TMemberFunctionPointer) (Subject *, const Event &)

pointer to a member function that takes a Subject* and the event

Constructor & Destructor Documentation

◆ MemberCommand() [1/2]

template<class T >
gdcm::MemberCommand< T >::MemberCommand ( const Self )
delete

◆ MemberCommand() [2/2]

template<class T >
gdcm::MemberCommand< T >::MemberCommand ( )
inlineprotected

◆ ~MemberCommand()

template<class T >
gdcm::MemberCommand< T >::~MemberCommand ( )
overrideprotecteddefault

Member Function Documentation

◆ Execute() [1/2]

template<class T >
void gdcm::MemberCommand< T >::Execute ( const Subject caller,
const Event event 
)
inlineoverridevirtual

Invoke the member function with a const object.

Implements gdcm::Command.

References gdcm::MemberCommand< T >::m_ConstMemberFunction.

◆ Execute() [2/2]

template<class T >
void gdcm::MemberCommand< T >::Execute ( Subject caller,
const Event event 
)
inlineoverridevirtual

Invoke the member function.

Implements gdcm::Command.

References gdcm::MemberCommand< T >::m_MemberFunction.

◆ New()

template<class T >
static SmartPointer< MemberCommand > gdcm::MemberCommand< T >::New ( )
inlinestatic

Method for creation through the object factory.

References gdcm::MemberCommand< T >::MemberCommand().

◆ operator=()

template<class T >
void gdcm::MemberCommand< T >::operator= ( const Self )
delete

◆ SetCallbackFunction() [1/2]

template<class T >
void gdcm::MemberCommand< T >::SetCallbackFunction ( T *  object,
TConstMemberFunctionPointer  memberFunction 
)
inline

◆ SetCallbackFunction() [2/2]

template<class T >
void gdcm::MemberCommand< T >::SetCallbackFunction ( T *  object,
TMemberFunctionPointer  memberFunction 
)
inline

Run-time type information (and related methods). Set the callback function along with the object that it will be invoked on.

References gdcm::MemberCommand< T >::m_MemberFunction, and gdcm::MemberCommand< T >::m_This.

Member Data Documentation

◆ m_ConstMemberFunction

template<class T >
TConstMemberFunctionPointer gdcm::MemberCommand< T >::m_ConstMemberFunction
protected

◆ m_MemberFunction

template<class T >
TMemberFunctionPointer gdcm::MemberCommand< T >::m_MemberFunction
protected

◆ m_This

template<class T >
T* gdcm::MemberCommand< T >::m_This
protected

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