forked from xcj2012/Configuration-61850
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MemberFxn.cpp
58 lines (45 loc) · 930 Bytes
/
MemberFxn.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
Copyright 2006 - 2008, All Rights Reserved.
这个类用来描述一个C++类成员函数地址
作者 - 张鲁夺(zhangluduo)
MSN - [email protected]
QQ群 - 34064264
为所有爱我的人和我爱的人努力!
*/
#include "MemberFxn.h"
MemberFxn::MemberFxn( ) : m_This(0), m_MemberFxnAddr(0)
{
}
MemberFxn::~MemberFxn( )
{
}
MemberFxn::MemberFxn(int n /* n must be zero */)
{
if(n != 0)
return ;
m_This = 0;
m_MemberFxnAddr = 0;
}
MemberFxn& MemberFxn::operator = (MemberFxn addr)
{
m_This = addr.m_This;
m_MemberFxnAddr = addr.m_MemberFxnAddr;
return *this;
}
bool MemberFxn::operator == (MemberFxn addr)
{
return m_This == addr.GetThis() && m_MemberFxnAddr == addr.GetAddr();
}
bool MemberFxn::IsNull()
{
return m_This == 0 && m_MemberFxnAddr == 0 ? true : false;
}
void* MemberFxn::GetThis()
{
return m_This;
}
unsigned long MemberFxn::GetAddr()
{
return m_MemberFxnAddr;
}