aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc
diff options
context:
space:
mode:
authorGravatar Gaurav Vaish <gaurav.vaish@gmail.com>2016-03-24 11:44:56 -0700
committerGravatar Gaurav Vaish <gaurav.vaish@gmail.com>2016-04-05 09:47:11 -0700
commit74d8b0bebc233331b1861354908f7fa0fde9d769 (patch)
treee99c0b9bb481959a32e32f5b2c539d7edaa74aae /src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc
parent452e2b2c5c607ab5d63cd813793f1aa960f19d1c (diff)
Added access_level for types
* `csharp_options`: Added `Options` to encapsulate generator options. Supported options for now - file_extension, base_namespace * `{Blah}Generator`: Now accept `Options*` as parameter to constructor * `csharp_generator.cc`: Parse and populate options * `Makefile.am`: Added `csharp_options.h` * `extract_includes.bat.in`: Added `csharp_options.h` Refactoring code to two commits. This is the first commit
Diffstat (limited to 'src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc')
-rw-r--r--src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc b/src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc
index 6a3750e0..10767f03 100644
--- a/src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc
+++ b/src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc
@@ -39,6 +39,7 @@
#include <google/protobuf/compiler/csharp/csharp_doc_comment.h>
#include <google/protobuf/compiler/csharp/csharp_helpers.h>
+#include <google/protobuf/compiler/csharp/csharp_options.h>
#include <google/protobuf/compiler/csharp/csharp_wrapper_field.h>
namespace google {
@@ -47,8 +48,8 @@ namespace compiler {
namespace csharp {
WrapperFieldGenerator::WrapperFieldGenerator(const FieldDescriptor* descriptor,
- int fieldOrdinal)
- : FieldGeneratorBase(descriptor, fieldOrdinal) {
+ int fieldOrdinal, const Options *options)
+ : FieldGeneratorBase(descriptor, fieldOrdinal, options) {
variables_["has_property_check"] = name() + "_ != null";
variables_["has_not_property_check"] = name() + "_ == null";
const FieldDescriptor* wrapped_field = descriptor->message_type()->field(0);
@@ -152,8 +153,8 @@ void WrapperFieldGenerator::GenerateCodecCode(io::Printer* printer) {
}
WrapperOneofFieldGenerator::WrapperOneofFieldGenerator(const FieldDescriptor* descriptor,
- int fieldOrdinal)
- : WrapperFieldGenerator(descriptor, fieldOrdinal) {
+ int fieldOrdinal, const Options *options)
+ : WrapperFieldGenerator(descriptor, fieldOrdinal, options) {
SetCommonOneofFieldVariables(&variables_);
}