12345678910111213141516171819202122232425262728 |
- #pragma once
- #include <functional>
- class Model;
- class View
- {
- protected:
- int ref;
- public:
- View();
- virtual ~View();
- virtual void update( Model *m ) = 0;
- View *getThis();
- View *release();
- };
- class ActionView : public View
- {
- private:
- std::function< void( Model * ) > f;
- public:
- ActionView( std::function< void( Model * ) > f );
- void update( Model *m ) override;
- };
|