Реализации на С++
Abstract factory
Last updated
Was this helpful?
Abstract factory
Last updated
Was this helpful?
Was this helpful?
class BaseGraphics
{
public:
virtual ~BaseGraphics() = 0;
};
BaseGraphics::~BaseGraphics() {}
class QtGraphics
# include <iostream>
# include <memory>
using namespace std;
int main()
{
shared_ptr<AbstractGraphFactory> grfactory = make_shared<QtGraphFactory>();
unique_ptr<User> us = make_unique<User>();
us->use(grfactory);
}