soui 5.0.0.1
Soui5 Doc
 
Loading...
Searching...
No Matches
MemberFunctionSlot< T, A > Class Template Reference

通过类成员函数回调的槽函数类模板 More...

#include <SEventSlot.h>

Inheritance diagram for MemberFunctionSlot< T, A >:
TObjRefImpl< IEvtSlot >

Public Types

typedef BOOL(T::* MemberFunctionType) (A *)
 成员函数槽类型
 

Public Member Functions

 MemberFunctionSlot (MemberFunctionType func, T *obj)
 构造函数
 
BOOL Run (IEvtArgs *pArg) OVERRIDE
 运行槽函数
 
IEvtSlot * Clone () SCONST OVERRIDE
 克隆槽函数对象
 
BOOL Equal (const IEvtSlot *sour) SCONST OVERRIDE
 比较两个槽函数对象是否相等
 
UINT GetSlotType () SCONST OVERRIDE
 获取槽函数类型
 
- Public Member Functions inherited from TObjRefImpl< IEvtSlot >
 TObjRefImpl ()
 Constructor that initializes the reference count to 1.
 
virtual ~TObjRefImpl ()
 Virtual destructor.
 
long AddRef () override
 Increments the reference count.
 
long Release () override
 Decrements the reference count and deletes the object if the count reaches zero.
 
void OnFinalRelease () override
 Deletes the object.
 

Additional Inherited Members

- Protected Attributes inherited from TObjRefImpl< IEvtSlot >
LONG m_cRef
 Reference count.
 

Detailed Description

template<typename T, typename A>
class MemberFunctionSlot< T, A >

通过类成员函数回调的槽函数类模板

Template Parameters
T类型
A事件参数类型

Definition at line 168 of file SEventSlot.h.

Member Typedef Documentation

◆ MemberFunctionType

template<typename T, typename A>
typedef BOOL(T::* MemberFunctionSlot< T, A >::MemberFunctionType) (A *)

成员函数槽类型

Definition at line 173 of file SEventSlot.h.

Constructor & Destructor Documentation

◆ MemberFunctionSlot()

template<typename T, typename A>
MemberFunctionSlot< T, A >::MemberFunctionSlot ( MemberFunctionType func,
T * obj )
inline

构造函数

Parameters
func成员函数指针
obj对象指针

Definition at line 180 of file SEventSlot.h.

Member Function Documentation

◆ Clone()

template<typename T, typename A>
IEvtSlot * MemberFunctionSlot< T, A >::Clone ( )
inline

克隆槽函数对象

Returns
克隆的槽函数对象指针

Definition at line 200 of file SEventSlot.h.

◆ Equal()

template<typename T, typename A>
BOOL MemberFunctionSlot< T, A >::Equal ( const IEvtSlot * sour)
inline

比较两个槽函数对象是否相等

Parameters
sour源槽函数对象指针
Returns
相等返回TRUE,不相等返回FALSE

Definition at line 210 of file SEventSlot.h.

◆ GetSlotType()

template<typename T, typename A>
UINT MemberFunctionSlot< T, A >::GetSlotType ( )
inline

获取槽函数类型

Returns
槽函数类型

Definition at line 224 of file SEventSlot.h.

◆ Run()

template<typename T, typename A>
BOOL MemberFunctionSlot< T, A >::Run ( IEvtArgs * pArg)
inline

运行槽函数

Parameters
pArg事件参数对象
Returns
成功返回TRUE,失败返回FALSE

Definition at line 191 of file SEventSlot.h.


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