www.pudn.com > Observerwangdxh.zip > Subject.h
// Subject.h : interface of the CSubject class
//
/////////////////////////////////////////////////////////////////////////////
#ifndef _SUBJECT
#define _SUBJECT
#include "Observer.h"
class CSubject
{
// Destructor
public :
virtual ~CSubject();
// Methods
public :
virtual VOID Attach( CObserver * );
virtual VOID Detach( CObserver * );
virtual VOID Notify();
// Protected constructor and attribute(s)
protected :
CSubject();
CPtrList m_ObserverList;
};
#endif