scim  1.4.18
scim::MethodSlot1< T, R, P1 > Class Template Reference

A slot template for methods in a class of type T taking one argument of type P1 and returning a value of type R. More...

#include <scim_slot.h>

Public Member Functions

 MethodSlot1 (T *object, PMF function)
 
virtual R call (P1 p1) const
 
- Public Member Functions inherited from scim::Slot1< R, P1 >
operator() (P1 p1) const
 Function operator; Calls call(). More...
 
- Public Member Functions inherited from scim::ReferencedObject
bool is_referenced () const
 
void ref ()
 Increase an object's reference count by one. More...
 
void unref ()
 

Additional Inherited Members

- Protected Member Functions inherited from scim::Slot1< R, P1 >
 Slot1 ()
 Constructor. More...
 
- Protected Member Functions inherited from scim::Slot
 Slot ()
 Constructor. More...
 
virtual ~Slot ()=0
 Destructor. More...
 
- Protected Member Functions inherited from scim::ReferencedObject
 ReferencedObject ()
 Constructor. More...
 
virtual ~ReferencedObject ()=0
 Destructor. More...
 
void set_referenced (bool reference)
 

Detailed Description

template<typename T, typename R, typename P1>
class scim::MethodSlot1< T, R, P1 >

A slot template for methods in a class of type T taking one argument of type P1 and returning a value of type R.

Constructor & Destructor Documentation

◆ MethodSlot1()

template<typename T, typename R, typename P1>
scim::MethodSlot1< T, R, P1 >::MethodSlot1 ( T *  object,
PMF  function 
)
inline

Construct a new method slot for a class member function.

Parameters
object- a pointer to an object of type T.
function- a class method with the signature R (T::*PMF)(P1).

Member Function Documentation

◆ call()

template<typename T, typename R, typename P1>
virtual R scim::MethodSlot1< T, R, P1 >::call ( P1  p1) const
inlinevirtual

Calls the class method connected to this slot passing it argument p1.

Returns
a value of type R returned by the called method.

Implements scim::Slot1< R, P1 >.


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