类定义:CMemberFuncPointer

=======================================================================

 1 // MemberFuncPointer.h: interface for the CMemberFuncPointer class.
 2 //
 3 //////////////////////////////////////////////////////////////////////
 4 
 5 #if !defined(AFX_MEMBERFUNCPOINTER_H__4D78718D_778E_4427_BBC1_C5F2D52C64E5__INCLUDED_)
 6 #define AFX_MEMBERFUNCPOINTER_H__4D78718D_778E_4427_BBC1_C5F2D52C64E5__INCLUDED_
 7 
 8 #if _MSC_VER > 1000
 9 #pragma once
10 #endif // _MSC_VER > 1000
11 
12 // 成员函数指针最大长度
13 #define MEMBER_FUNC_POINTER_MAX_SIZE 32
14 class CMemberFuncPointer  
15 {
16 public:
17     void Reset();
18     void Set(const void*pFunc,int p_size);
19     void Get(void*pFunc);
20     CMemberFuncPointer();
21     CMemberFuncPointer(const char pointerdata[],int p_size);
22     CMemberFuncPointer(void* pointerdata,int p_size);
23     virtual ~CMemberFuncPointer();
24     
25     bool operator==(const CMemberFuncPointer &mfp) const;
26     bool operator!=(const CMemberFuncPointer &mfp) const;
27 
28     CMemberFuncPointer& operator=(const CMemberFuncPointer &mfp);
29 
30 private:
31     int m_size;
32     char m_pointer_data[MEMBER_FUNC_POINTER_MAX_SIZE];
33 };
34 
35 #endif // !defined(AFX_MEMBERFUNCPOINTER_H__4D78718D_778E_4427_BBC1_C5F2D52C64E5__INCLUDED_)
MemberFuncPointer.h

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-12
  • 2021-09-04
  • 2022-12-23
  • 2021-08-30
  • 2022-12-23
  • 2021-08-16
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-11
相关资源
相似解决方案