Geogram  Version 1.9.1-rc
A programming library of geometric algorithms
GEO::MemberFunctionCommandInvoker< T, TFPTR > Class Template Reference

An implementation of CommandInvoker that calls a member function of an object. More...

#include <geogram_gfx/gui/command.h>

Inheritance diagram for GEO::MemberFunctionCommandInvoker< T, TFPTR >:
GEO::CommandInvoker GEO::Counted

Public Member Functions

 MemberFunctionCommandInvoker (Command *command, T *target, TFPTR target_fun)
 MemberFunctionCommandInvoker constructor. More...
 
void invoke () override
 Invokes the target function. More...
 
void auto_create_args () override
 Creates the arguments in the target command. More...
 
- Public Member Functions inherited from GEO::CommandInvoker
 CommandInvoker ()
 CommandInvoker constructor.
 
 ~CommandInvoker () override
 CommandInvoker destructor.
 
- Public Member Functions inherited from GEO::Counted
void ref () const
 Increments the reference count. More...
 
void unref () const
 Decrements the reference count. More...
 
bool is_shared () const
 Check if the object is shared. More...
 
int nb_refs () const
 Gets the number of references that point to this object. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from GEO::Counted
static void ref (const Counted *counted)
 Increments the reference count. More...
 
static void unref (const Counted *counted)
 Decrements the reference count. More...
 
- Protected Member Functions inherited from GEO::Counted
 Counted ()
 Creates a reference counted object. More...
 
virtual ~Counted ()
 Destroys a reference counted object. More...
 

Detailed Description

template<class T, class TFPTR>
class GEO::MemberFunctionCommandInvoker< T, TFPTR >

An implementation of CommandInvoker that calls a member function of an object.

Template Parameters
Tclass of the object
TFPTRfunction pointer type for the function to be called

Definition at line 1372 of file command.h.

Constructor & Destructor Documentation

◆ MemberFunctionCommandInvoker()

template<class T , class TFPTR >
GEO::MemberFunctionCommandInvoker< T, TFPTR >::MemberFunctionCommandInvoker ( Command command,
T *  target,
TFPTR  target_fun 
)
inline

MemberFunctionCommandInvoker constructor.

Parameters
[in]commanda pointer to the Command object
[in]targeta pointer to the object
[in]target_funthe member function pointer

Definition at line 1382 of file command.h.

Member Function Documentation

◆ auto_create_args()

template<class T , class TFPTR >
void GEO::MemberFunctionCommandInvoker< T, TFPTR >::auto_create_args ( )
inlineoverridevirtual

Creates the arguments in the target command.

This function is used when client code did not provide a function prototype to the constructor of Command.

Implements GEO::CommandInvoker.

Definition at line 1404 of file command.h.

◆ invoke()

template<class T , class TFPTR >
void GEO::MemberFunctionCommandInvoker< T, TFPTR >::invoke ( )
inlineoverridevirtual

Invokes the target function.

Implements GEO::CommandInvoker.

Definition at line 1396 of file command.h.


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