设计模式之 装饰模式
class Phone { public: virtual ~Phone(void){} virtual void show(void) = 0; }; class iPhone: public Phone { public: iPhone(void); ~iPhone(void); public: virtual void show(void); }; class Decorator: public Phone { public: Decorator(Phone *phone); ~Decorator(void); public: virtual void show(void); protected: void addDecorator(void); protected: Phone *phone_; };