#include <string>
#include <iostream>
#include <memory>

using namespace std;

class Window;

class Figure {
public:
    virtual void draw() const = 0;
};

class Rect : public Figure {
public:
    void draw() const override {
        doDraw();
    }
private:
    void doDraw() const;

    //uchwyt do okna, do piora i inne skladowe niezebedne do rysowania
    Window* w;
};

void Rect::doDraw() const {
        //bardzo skomplikowane i uzywa wielu bibliotek zewnetrznych
        cout << "Rect" << endl;
}


// class Rect : public Figure {
// public:
//  void draw() const override;
// private:
//  struct Impl;
//  unique_ptr<Impl> impl_;
// };

// struct Rect::Impl {

//  void doDraw() const {
//      //bardzo skomplikowane i uzywa wielu bibliotek zewnetrznych
//      cout << "Rect" << endl;
//  }
// };

// void Rect::draw() const {
//  impl_->doDraw();
// };




int main() {
    Rect r;
    r.draw();
    return 0;
}
