设计模式之 原型模式

 

class Prototype
{
public:
    virtual ~Prototype(void){};
    virtual Prototype* clone(void) = 0;
};

class Prototype1: public Prototype
{
public:
    Prototype1(void);
    ~Prototype1(void);
public:
    virtual Prototype* clone(void);
private:

};

class Prototype2: public Prototype
{
public:
    Prototype2(void);
    ~Prototype2(void);
public:
    virtual Prototype* clone(void);
private:

};

 

posted on 2015-07-30 17:53  霏霏暮雨  阅读(114)  评论(0编辑  收藏  举报

导航