You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
464 B
C

#pragma once
#include "Observer.h"
#include "GlobalDefine.h"
//<2F>۲<EFBFBD><DBB2><EFBFBD>ģʽ<C4A3><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӿ<EFBFBD>
class CSubject
{
public:
CSubject(void);
virtual ~CSubject(void);
void Attach(CObserver*);//ע<><D7A2><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>
void Delete(CObserver*);//ɾ<><C9BE><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>
void NotifyObservers();//֪ͨ<CDA8><D6AA><EFBFBD>й۲<D0B9><DBB2><EFBFBD>
void DeleteAllObservers(){m_ObserverVec.clear();};//ɾ<><C9BE><EFBFBD><EFBFBD><EFBFBD>й۲<D0B9><DBB2><EFBFBD>
void SetObserversVal1(double val);
protected:
vector<CObserver*> m_ObserverVec;//<2F>۲<EFBFBD><DBB2>ߵ<EFBFBD><DFB5><EFBFBD><EFBFBD><EFBFBD>
};