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

Unified Diff: generated_files_will_not_submit/choices.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 | « generated_files_will_not_submit/array.cc ('k') | generated_files_will_not_submit/choices.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: generated_files_will_not_submit/choices.h
diff --git a/generated_files_will_not_submit/choices.h b/generated_files_will_not_submit/choices.h
new file mode 100644
index 0000000000000000000000000000000000000000..4c9ea5590c056acfe02727c0baac5f941e84f839
--- /dev/null
+++ b/generated_files_will_not_submit/choices.h
@@ -0,0 +1,160 @@
+// 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/choices.json
+// DO NOT EDIT.
+
+#ifndef TOOLS_JSON_SCHEMA_COMPILER_TEST_CHOICES_H__
+#define TOOLS_JSON_SCHEMA_COMPILER_TEST_CHOICES_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 choices {
+
+//
+// Types
+//
+
+//
+// Functions
+//
+
+namespace TakesIntegersOptional {
+ struct Params {
+ scoped_ptr<std::vector<int> > nums_array;
+
+ scoped_ptr<int> nums_integer;
+
+ enum NumsType {
+ NUMS_NONE,
+ NUMS_ARRAY,
+ NUMS_INTEGER,
+ };
+
+ NumsType nums_type;
+ ~Params();
+
+ static scoped_ptr<Params> Create(const ListValue& args);
+
+ private:
+ Params();
+
+ DISALLOW_COPY_AND_ASSIGN(Params);
+ };
+
+ namespace Result {
+ Value* Create();
+ };
+
+};
+
+namespace ReturnChoices {
+
+ namespace Result {
+ Value* Create(const std::vector<int>& result_array);
+ Value* Create(const int result_integer);
+ };
+
+};
+
+namespace TakesIntegers {
+ struct Params {
+ scoped_ptr<std::vector<int> > nums_array;
+
+ scoped_ptr<int> nums_integer;
+
+ enum NumsType {
+ NUMS_NONE,
+ NUMS_ARRAY,
+ NUMS_INTEGER,
+ };
+
+ NumsType nums_type;
+ ~Params();
+
+ static scoped_ptr<Params> Create(const ListValue& args);
+
+ private:
+ Params();
+
+ DISALLOW_COPY_AND_ASSIGN(Params);
+ };
+
+ namespace Result {
+ Value* Create();
+ };
+
+};
+
+namespace ObjectWithChoices {
+ struct Params {
+ struct StringInfo {
+ ~StringInfo();
+ StringInfo();
+
+ scoped_ptr<std::vector<int> > integers_array;
+
+ scoped_ptr<int> integers_integer;
+
+ scoped_ptr<std::vector<std::string> > strings_array;
+
+ scoped_ptr<std::string> strings_string;
+
+ enum IntegersType {
+ INTEGERS_NONE,
+ INTEGERS_ARRAY,
+ INTEGERS_INTEGER,
+ };
+
+ IntegersType integers_type;
+ enum StringsType {
+ STRINGS_NONE,
+ STRINGS_ARRAY,
+ STRINGS_STRING,
+ };
+
+ StringsType strings_type;
+ // Populates a StringInfo object from a Value. Returns whether |out| was
+ // successfully populated.
+ static bool Populate(const Value& value, StringInfo* out);
+
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(StringInfo);
+ };
+
+ StringInfo string_info;
+
+ ~Params();
+
+ static scoped_ptr<Params> Create(const ListValue& args);
+
+ private:
+ Params();
+
+ DISALLOW_COPY_AND_ASSIGN(Params);
+ };
+
+ namespace Result {
+ Value* Create();
+ };
+
+};
+
+
+} // choices
+} // api
+} // test
+
+#endif // TOOLS_JSON_SCHEMA_COMPILER_TEST_CHOICES_H__
« no previous file with comments | « generated_files_will_not_submit/array.cc ('k') | generated_files_will_not_submit/choices.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698