aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/compiler/cpp/cpp_helpers.h
diff options
context:
space:
mode:
authorGravatar kenton@google.com <kenton@google.com@630680e5-0e50-0410-840e-4b1c322b438d>2009-04-18 00:02:12 +0000
committerGravatar kenton@google.com <kenton@google.com@630680e5-0e50-0410-840e-4b1c322b438d>2009-04-18 00:02:12 +0000
commitcfa2d8aa87cc0b22b5092a5fb3bf7e394f85cbf1 (patch)
tree77ee2f4d02dfb43187511f3eb5a37a00c2f6f5de /src/google/protobuf/compiler/cpp/cpp_helpers.h
parenteb26a1efdef3f1f5e77807d456a08f3c76cc5207 (diff)
Generate field number constants. Patch from Michael Poole.
Diffstat (limited to 'src/google/protobuf/compiler/cpp/cpp_helpers.h')
-rw-r--r--src/google/protobuf/compiler/cpp/cpp_helpers.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/google/protobuf/compiler/cpp/cpp_helpers.h b/src/google/protobuf/compiler/cpp/cpp_helpers.h
index 80c2f2ee..30c6e7d0 100644
--- a/src/google/protobuf/compiler/cpp/cpp_helpers.h
+++ b/src/google/protobuf/compiler/cpp/cpp_helpers.h
@@ -65,6 +65,10 @@ string ClassName(const EnumDescriptor* enum_descriptor, bool qualified);
// anyway, so normally this just returns field->name().
string FieldName(const FieldDescriptor* field);
+// Get the unqualified name that should be used for a field's field
+// number constant.
+string FieldConstantName(const FieldDescriptor *field);
+
// Returns the scope where the field was defined (for extensions, this is
// different from the message type to which the field applies).
inline const Descriptor* FieldScope(const FieldDescriptor* field) {