摘要:
#include <iostream> #include <memory> class SubsystemA { public: void show() { std::cout << "In SubsystemA show()." << std::endl; } }; class Subsystem 阅读全文
摘要:
#include <iostream> #include <memory> class Component { public: virtual void show() = 0; }; class ConcreteComponent : public Component { public: void 阅读全文
摘要:
#include <iostream> #include <memory> class Implementation { public: virtual void show() = 0; }; class ConcreteImplementation1 : public Implementation 阅读全文
摘要:
#include <iostream> #include <list> #include <memory> class Component { public: virtual void show() const = 0; virtual void add(const std::shared_ptr< 阅读全文
摘要:
#include <iostream> #include <memory> class Adaptee { public: void concreteShow() { std::cout << "In Adaptee concreteShow()." << std::endl; } }; class 阅读全文
摘要:
#include <iostream> class Singleton { public: Singleton(const Singleton&) = delete; Singleton& operator = (const Singleton&) = delete; static Singleto 阅读全文
摘要:
#include <memory> #include <iostream> class Prototype { public: Prototype() {} Prototype(const Prototype& p) { this->data = p.data; } virtual std::uni 阅读全文
摘要:
#include <iostream> #include <memory> class Product { public: void setPartA(int partA) { this->partA = partA; } void setPartB(int partB) { this->partB 阅读全文
摘要:
#include <iostream> #include <memory> class ProductA { public: virtual void show() = 0; }; class ConcreteProductA1 : public ProductA { public: void sh 阅读全文
摘要:
#include <iostream> #include <memory> class Product { public: virtual void show() const { std::cout << "In Product show()." << std::endl; } }; class C 阅读全文