| Index: samples/todomvc/dart/todomvc_presenter.dart
|
| diff --git a/samples/todomvc/dart/todomvc_presenter.dart b/samples/todomvc/dart/todomvc_presenter.dart
|
| deleted file mode 100644
|
| index e364c63312eb7a363f1df730e2f4b3ae5308188c..0000000000000000000000000000000000000000
|
| --- a/samples/todomvc/dart/todomvc_presenter.dart
|
| +++ /dev/null
|
| @@ -1,50 +0,0 @@
|
| -// Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file
|
| -// for details. All rights reserved. Use of this source code is governed by a
|
| -// BSD-style license that can be found in the LICENSE.md file.
|
| -
|
| -// Should become auto-generated.
|
| -
|
| -library todomvc_presenter;
|
| -
|
| -import 'todomvc_service.dart';
|
| -import 'todomvc_presenter_model.dart';
|
| -
|
| -abstract class TodoMVCPresenter extends TodoMVCService {
|
| -
|
| - var _presentation = new Nil();
|
| - var _eventManager = new EventManager();
|
| -
|
| - // Construct a "presenter model" from the model.
|
| - Immutable render(Immutable previous);
|
| -
|
| - // Compare two "presenter models" to calculate a patch set for the host.
|
| - MyPatchSet diff(Immutable previous, Immutable current) {
|
| - var patchSet = new MyPatchSet();
|
| - current.diff(previous, null, patchSet);
|
| - for (var patch in patchSet.patches) {
|
| - trace("{ path: ${patch.path}, content: ${patch.content} }");
|
| - }
|
| - return patchSet;
|
| - }
|
| -
|
| - // Update the presentation and get the current patch set.
|
| - MyPatchSet update() {
|
| - var previous = _presentation;
|
| - _presentation = render(previous);
|
| - return diff(previous, _presentation);
|
| - }
|
| -
|
| - // Entry point for synchronizing with the host mirror.
|
| - void sync(PatchSetBuilder result) {
|
| - update().serialize(result, _eventManager);
|
| - }
|
| -
|
| - void reset() {
|
| - _presentation = new Nil();
|
| - _eventManager.clear();
|
| - }
|
| -
|
| - void dispatch(int eventHandlerId) {
|
| - _eventManager.call(eventHandlerId);
|
| - }
|
| -}
|
|
|