資源簡(jiǎn)介
觀察者模式 c++ 工程角度實(shí)現(xiàn)
代碼片段和文件信息
#include?“CBloger.h“
#include?“gloabal.h“
CBloger::CBloger()
{
SetClassTypeID(BLOG_READER);
}
CBloger::~CBloger()
{
}
void?CBloger::Publish(const?string?&strContent)
{
cout?<“bloger?Publish?:?“?< SetChanged();
Notify(const_cast(strContent.c_str()));
}
評(píng)論
共有 條評(píng)論