blob: da83c32d57b87732a7c85938a70a2549dc3b6fce (
plain)
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
|
#include "LAttachable.h"
#include "LAttachment.h"
LAttachment::LAttachment(unsigned int message, BOOL executeHost) {
mOwnerHost = NULL;
mMessage = message;
mExecuteHost = executeHost;
}
/*virtual*/ LAttachment::~LAttachment() {
if (mOwnerHost)
mOwnerHost->RemoveAttachment(this);
}
/*virtual*/ void LAttachment::SetExecuteHost(BOOL v) {
mExecuteHost = v;
}
/*virtual*/ BOOL LAttachment::Execute(unsigned int message, void* data) {
BOOL result = true;
if (message == mMessage || mMessage == 0) {
ExecuteSelf(message, data);
result = mExecuteHost;
}
return result;
}
/*virtual*/ void LAttachment::ExecuteSelf(unsigned int message, void* data) {
}
|