12345678910111213141516171819202122232425262728293031323334 |
- #include "View.h"
- View::View()
- {
- ref = 1;
- }
- View::~View()
- {}
- View *View::getThis()
- {
- ref++;
- return this;
- }
- View *View::release()
- {
- if( !--ref )
- delete this;
- return 0;
- }
- ActionView::ActionView( std::function< void( Model * ) > f )
- : View()
- {
- this->f = f;
- }
- void ActionView::update( Model *m )
- {
- f( m );
- }
|