Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1010)

Unified Diff: samples/myapi/generated/myapi_service_impl.dart

Issue 1209033003: Work in progres, please take a look and give early feedback if this is the way we want to structure… (Closed) Base URL: git@github.com:dart-lang/fletch.git@master
Patch Set: address comments Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « samples/myapi/generated/myapi_service.idl ('k') | samples/myapi/myapi.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/myapi/generated/myapi_service_impl.dart
diff --git a/samples/myapi/generated/myapi_service_impl.dart b/samples/myapi/generated/myapi_service_impl.dart
deleted file mode 100644
index 6270c44ff35515bb41af73d0679895bb9c2bceb4..0000000000000000000000000000000000000000
--- a/samples/myapi/generated/myapi_service_impl.dart
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (c) 2015, the Fletch 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.
-
-import 'dart/myapi_service.dart';
-import '../myapi_impl.dart' as impl;
-
-class ApiService {
- final Map<int, List> objects = {};
-
- int create() {
- int api = objects.length;
- objects[api] = new List();
- return api;
- }
-
- void destroy(int api) {
- objects[api].clear();
- }
-
- int register(int api, Object o) {
- List list = objects[api];
- int index = list.indexOf(o);
- if (index >= 0) return index;
- index = list.length;
- list.add(o);
- return index;
- }
-}
-
-class MyApiServiceImpl extends ApiService implements MyApiService {
- int foo(int api) {
- impl.MyObject result = impl.foo();
- return register(api, result);
- }
-
- void MyObject_funk(int api, int id, int o) {
- impl.MyObject object = objects[api][id];
- object.funk(objects[api][o]);
- }
-}
-
-void main() {
- var impl = new MyApiServiceImpl();
- MyApiService.initialize(impl);
- while (MyApiService.hasNextEvent()) {
- MyApiService.handleNextEvent();
- }
-}
« no previous file with comments | « samples/myapi/generated/myapi_service.idl ('k') | samples/myapi/myapi.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698