aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/compiler/csharp/csharp_helpers.h
diff options
context:
space:
mode:
authorJon Skeet <jonskeet@google.com>2015-07-15 13:17:42 +0100
committerJon Skeet <jonskeet@google.com>2015-07-16 09:36:30 +0100
commitb2ac868493742327b2ebbcacd97947126f8841f7 (patch)
treed6cac75812d3953e096d6195f6006fb44714b1f9 /src/google/protobuf/compiler/csharp/csharp_helpers.h
parent7ea5239792c3c449e7ae36caa3a9de04b90d0bbe (diff)
downloadprotobuf-b2ac868493742327b2ebbcacd97947126f8841f7.tar.gz
protobuf-b2ac868493742327b2ebbcacd97947126f8841f7.tar.bz2
protobuf-b2ac868493742327b2ebbcacd97947126f8841f7.zip
First part of implementing wrapper types. Not ready yet!
Diffstat (limited to 'src/google/protobuf/compiler/csharp/csharp_helpers.h')
-rw-r--r--src/google/protobuf/compiler/csharp/csharp_helpers.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/google/protobuf/compiler/csharp/csharp_helpers.h b/src/google/protobuf/compiler/csharp/csharp_helpers.h
index a7c2395b..b6a75b34 100644
--- a/src/google/protobuf/compiler/csharp/csharp_helpers.h
+++ b/src/google/protobuf/compiler/csharp/csharp_helpers.h
@@ -120,6 +120,15 @@ inline bool IsDescriptorProto(const FileDescriptor* descriptor) {
return descriptor->name() == "google/protobuf/descriptor_proto_file.proto";
}
+inline bool IsMapEntry(const Descriptor* descriptor) {
+ return descriptor->options().map_entry();
+}
+
+inline bool IsWrapperType(const FieldDescriptor* descriptor) {
+ return descriptor->type() == FieldDescriptor::TYPE_MESSAGE &&
+ descriptor->message_type()->file()->name() == "google/protobuf/wrappers.proto";
+}
+
} // namespace csharp
} // namespace compiler
} // namespace protobuf