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.
|
#pragma once
|
|
|
|
//观察者模式的观察者接口
|
|
class CObserver
|
|
{
|
|
public:
|
|
CObserver(void);
|
|
virtual ~CObserver(void);
|
|
virtual void Update(){};
|
|
void SetVal1(double val){m_Val1 = val;};
|
|
double GetVal1(){return m_Val1;};
|
|
private:
|
|
double m_Val1;//主题可以给观察者传递一些信息
|
|
};
|
|
|