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

Unified Diff: lib/protobuf/runtime/FieldInfo.dart

Issue 10595002: Protocol Buffer runtime library and 'protoc' plugin (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Work around http://code.google.com/p/dart/issues/detail?id=3806 Created 8 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 | « lib/protobuf/runtime/ExtensionRegistry.dart ('k') | lib/protobuf/runtime/GeneratedMessage.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/protobuf/runtime/FieldInfo.dart
diff --git a/lib/protobuf/runtime/FieldInfo.dart b/lib/protobuf/runtime/FieldInfo.dart
new file mode 100644
index 0000000000000000000000000000000000000000..a000339ed81f6ebfc97796c7ba3e1a5149e793a4
--- /dev/null
+++ b/lib/protobuf/runtime/FieldInfo.dart
@@ -0,0 +1,23 @@
+// Copyright (c) 2012, the Dart 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 file.
+
+/**
+ * An object representing a protobuf message field.
+ */
+class FieldInfo {
+ final String name;
+ final int tagNumber;
+ final int type;
+ final MakeDefaultFunc makeDefault;
+ final CreateBuilderFunc subBuilder;
+ final ValueOfFunc valueOf;
+
+ FieldInfo(String this.name, int this.tagNumber, int type,
+ [MakeDefaultFunc makeDefault, CreateBuilderFunc this.subBuilder = null,
+ ValueOfFunc this.valueOf = null])
+ : this.type = type, this.makeDefault =
+ makeDefault == null ? Builder._defaultForType(type) : makeDefault;
+
+ String toString() => name;
+}
« no previous file with comments | « lib/protobuf/runtime/ExtensionRegistry.dart ('k') | lib/protobuf/runtime/GeneratedMessage.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698