#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) { }