View.h 410 B

123456789101112131415161718192021222324
  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. };