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

Unified Diff: tools/json_schema_compiler/any_helper.py

Issue 11827026: Overhaul JSON Schema Compiler to support a number of features required to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 11 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 | « tools/json_schema_compiler/any.cc ('k') | tools/json_schema_compiler/api_gen_util.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/any_helper.py
diff --git a/tools/json_schema_compiler/any_helper.py b/tools/json_schema_compiler/any_helper.py
deleted file mode 100644
index a087ffdbcda050c16bca61dd453d7a5c43c65419..0000000000000000000000000000000000000000
--- a/tools/json_schema_compiler/any_helper.py
+++ /dev/null
@@ -1,32 +0,0 @@
-# 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.
-
-ANY_NAMESPACE = 'json_schema_compiler::any'
-ANY_CLASS = ANY_NAMESPACE + '::Any'
-
-class AnyHelper(object):
- """A util class that generates code that uses
- tools/json_schema_compiler/any.cc.
- """
- def Init(self, any_prop, src, dst):
- """Initialize |dst|.|any_prop| to |src|.
-
- src: Value*
- dst: Type*
- """
- if any_prop.optional:
- return '%s->%s->Init(*%s)' % (dst, any_prop.unix_name, src)
- else:
- return '%s->%s.Init(*%s)' % (dst, any_prop.unix_name, src)
-
- def GetValue(self, any_prop, var):
- """Get |var| as a const Value&.
-
- var: Any* or Any
- """
- if any_prop.optional:
- return '%s->value()' % var
- else:
- return '%s.value()' % var
-
« no previous file with comments | « tools/json_schema_compiler/any.cc ('k') | tools/json_schema_compiler/api_gen_util.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698