View.h 411 B

12345678910111213141516171819202122232425
  1. #pragma once
  2. #include <functional>
  3. #include <ReferenceCounter.h>
  4. class Model;
  5. class View : public virtual Framework::ReferenceCounter
  6. {
  7. public:
  8. View();
  9. virtual ~View();
  10. virtual void update( Model *m ) = 0;
  11. };
  12. class ActionView : public View
  13. {
  14. private:
  15. std::function< void( Model * ) > f;
  16. public:
  17. ActionView( std::function< void( Model * ) > f );
  18. void update( Model *m ) override;
  19. };