blob: dfe631cfae2c5ba564318fe0cefaea0e68749c13 (
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
30
|
#include "StdAfx.h"
#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) {
}
|