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

Unified Diff: samples/myapi/generated/myapi.h

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/dart/struct.dart ('k') | samples/myapi/generated/myapi_service.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/myapi/generated/myapi.h
diff --git a/samples/myapi/generated/myapi.h b/samples/myapi/generated/myapi.h
deleted file mode 100644
index dd43b6f3576a0a9bb05244d076354720dd51cb0c..0000000000000000000000000000000000000000
--- a/samples/myapi/generated/myapi.h
+++ /dev/null
@@ -1,54 +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.
-
-#ifndef MYAPI_H_
-#define MYAPI_H_
-
-#include "cc/myapi_service.h"
-
-class MyObject;
-
-class MyApi {
- public:
- static MyApi create() {
- MyApiService::setup();
- int api = MyApiService::create();
- return MyApi(api);
- }
-
- void destroy() {
- MyApiService::destroy(api_);
- MyApiService::tearDown();
- }
-
- inline MyObject foo();
-
- private:
- int api_;
-
- explicit MyApi(int api) : api_(api) { }
-};
-
-class MyObject {
- public:
- void funk(MyObject o) {
- // TODO(kasperl): Assert that o is from same api as 'this'.
- MyApiService::MyObject_funk(api_, id_, o.id_);
- }
-
- private:
- int api_;
- int id_;
-
- MyObject(int api, int id) : api_(api), id_(id) { }
-
- friend class MyApi;
-};
-
-inline MyObject MyApi::foo() {
- int id = MyApiService::foo(api_);
- return MyObject(api_, id);
-}
-
-#endif // MYAPI_H_
« no previous file with comments | « samples/myapi/generated/dart/struct.dart ('k') | samples/myapi/generated/myapi_service.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698