2011年5月26日

Flyweight (C++实现)

摘要: // Flyweight.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include <iostream>#include <list>#include <string>using namespace std;typedef string STATE;class Flyweight{public:STATE GetIntrinsicState(){return m_state;}virtual void Operation(STATE& Extrinsic)=0;protected:Flyw 阅读全文

posted @ 2011-05-26 21:55 IT@民工 阅读(205) 评论(0) 推荐(0) 编辑

Facade (C++实现)

摘要: // Facade.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include <iostream>using namespace std;class ServiceClass{public:ServiceClass(){cout<<"Construction of ServiceClas"<<endl;}virtual ~ServiceClass(){}void Operation1(){cout<<"Do Operation1"<< 阅读全文

posted @ 2011-05-26 14:25 IT@民工 阅读(123) 评论(0) 推荐(0) 编辑

导航