cmsgstation.h

来自「VC vod源码 放出来供大家交流学习」· C头文件 代码 · 共 41 行

H
41
字号
//
// CMsgStation.h
// 

#ifndef __H_CMsgStation__
#define __H_CMsgStation__

#include "CObjectList.h"

typedef long MessageT;
typedef long NotifyT;

class CMsgReceiver;
class CMsgStation
{
protected:
	CObjectList		mReceivers;

public:
	CMsgStation(void);
	virtual ~CMsgStation(void);

	void AddMsgReceiver(CMsgReceiver * inReceiver);
	void RemoveMsgReceiver(CMsgReceiver * inReceiver);

	bool Broadcast(MessageT inMessage, void * ioParam = 0, void * ioParam2 = 0);
	bool Notify(NotifyT inNotification, long inParam1 = 0, long inParam2 = 0);
};

const MessageT msg_StationDestroyed = 0;
const MessageT msg_Notify           = 1;

struct SNotificationStruct
{
	NotifyT			mNotification;
	CMsgStation *	mStation;
	long			mParam1;
	long			mParam2;
};

#endif // __H_CMsgStation__

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?