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

Unified Diff: generated_files_will_not_submit/array.h

Issue 9309044: Supporting more APIs with json_schema_compiler (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rework, add a couple of tests Created 8 years, 10 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 | « chrome/chrome_tests.gypi ('k') | generated_files_will_not_submit/array.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: generated_files_will_not_submit/array.h
diff --git a/generated_files_will_not_submit/array.h b/generated_files_will_not_submit/array.h
new file mode 100644
index 0000000000000000000000000000000000000000..257b6b9adf696093126a4c555a7d77d18a655c43
--- /dev/null
+++ b/generated_files_will_not_submit/array.h
@@ -0,0 +1,118 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// GENERATED FROM THE API DEFINITION IN
+// tools/json_schema_compiler/test/array.json
+// DO NOT EDIT.
+
+#ifndef TOOLS_JSON_SCHEMA_COMPILER_TEST_ARRAY_H__
+#define TOOLS_JSON_SCHEMA_COMPILER_TEST_ARRAY_H__
+#pragma once
+
+#include <string>
+#include <vector>
+
+#include "base/basictypes.h"
+#include "base/memory/linked_ptr.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/values.h"
+
+namespace test {
+namespace api {
+namespace array {
+
+//
+// Types
+//
+
+struct Item {
+ ~Item();
+ Item();
+
+ int val;
+
+ // Populates a Item object from a Value. Returns whether |out| was
+ // successfully populated.
+ static bool Populate(const Value& value, Item* out);
+
+ // Returns a new DictionaryValue representing the serialized form of this
+ // Item object. Passes ownership to caller.
+ scoped_ptr<DictionaryValue> ToValue() const;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(Item);
+};
+
+struct BasicArrayType {
+ ~BasicArrayType();
+ BasicArrayType();
+
+ std::vector<int> integers;
+
+ std::vector<bool> booleans;
+
+ std::vector<double> numbers;
+
+ std::vector<std::string> strings;
+
+ // Populates a BasicArrayType object from a Value. Returns whether |out| was
+ // successfully populated.
+ static bool Populate(const Value& value, BasicArrayType* out);
+
+ // Returns a new DictionaryValue representing the serialized form of this
+ // BasicArrayType object. Passes ownership to caller.
+ scoped_ptr<DictionaryValue> ToValue() const;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(BasicArrayType);
+};
+
+struct RefArrayType {
+ ~RefArrayType();
+ RefArrayType();
+
+ std::vector<linked_ptr<Item> > refs;
+
+ // Populates a RefArrayType object from a Value. Returns whether |out| was
+ // successfully populated.
+ static bool Populate(const Value& value, RefArrayType* out);
+
+ // Returns a new DictionaryValue representing the serialized form of this
+ // RefArrayType object. Passes ownership to caller.
+ scoped_ptr<DictionaryValue> ToValue() const;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(RefArrayType);
+};
+
+//
+// Functions
+//
+
+namespace IntegerArray {
+ struct Params {
+ std::vector<int> nums;
+
+ ~Params();
+
+ static scoped_ptr<Params> Create(const ListValue& args);
+
+ private:
+ Params();
+
+ DISALLOW_COPY_AND_ASSIGN(Params);
+ };
+
+ namespace Result {
+ Value* Create();
+ };
+
+};
+
+
+} // array
+} // api
+} // test
+
+#endif // TOOLS_JSON_SCHEMA_COMPILER_TEST_ARRAY_H__
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | generated_files_will_not_submit/array.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698