| Index: third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc
|
| diff --git a/third_party/protobuf/src/google/protobuf/io/zero_copy_stream.cc b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc
|
| similarity index 63%
|
| copy from third_party/protobuf/src/google/protobuf/io/zero_copy_stream.cc
|
| copy to third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc
|
| index dad6ff14468d031f16baafb2f1ca567961251c43..735d164a48f3157513c5f92f4f10cf5dc772ca67 100644
|
| --- a/third_party/protobuf/src/google/protobuf/io/zero_copy_stream.cc
|
| +++ b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc
|
| @@ -1,6 +1,6 @@
|
| // Protocol Buffers - Google's data interchange format
|
| // Copyright 2008 Google Inc. All rights reserved.
|
| -// http://code.google.com/p/protobuf/
|
| +// https://developers.google.com/protocol-buffers/
|
| //
|
| // Redistribution and use in source and binary forms, with or without
|
| // modification, are permitted provided that the following conditions are
|
| @@ -28,21 +28,39 @@
|
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| -// Author: kenton@google.com (Kenton Varda)
|
| -// Based on original Protocol Buffers design by
|
| -// Sanjay Ghemawat, Jeff Dean, and others.
|
| +#include <sstream>
|
|
|
| +#include <google/protobuf/compiler/code_generator.h>
|
| +#include <google/protobuf/compiler/plugin.h>
|
| +#include <google/protobuf/descriptor.h>
|
| +#include <google/protobuf/descriptor.pb.h>
|
| +#include <google/protobuf/io/printer.h>
|
| #include <google/protobuf/io/zero_copy_stream.h>
|
|
|
| +#include <google/protobuf/compiler/csharp/csharp_source_generator_base.h>
|
| +#include <google/protobuf/compiler/csharp/csharp_helpers.h>
|
|
|
| namespace google {
|
| namespace protobuf {
|
| -namespace io {
|
| +namespace compiler {
|
| +namespace csharp {
|
|
|
| -ZeroCopyInputStream::~ZeroCopyInputStream() {}
|
| -ZeroCopyOutputStream::~ZeroCopyOutputStream() {}
|
| +SourceGeneratorBase::SourceGeneratorBase(const FileDescriptor* descriptor)
|
| + : descriptor_(descriptor) {
|
| +}
|
|
|
| +SourceGeneratorBase::~SourceGeneratorBase() {
|
| +}
|
|
|
| -} // namespace io
|
| +void SourceGeneratorBase::WriteGeneratedCodeAttributes(io::Printer* printer) {
|
| + // This hook can be used to reintroduce generated code attributes in the future.
|
| +}
|
| +
|
| +std::string SourceGeneratorBase::class_access_level() {
|
| + return IsDescriptorProto(descriptor_) ? "internal" : "public"; // public_classes is always on.
|
| +}
|
| +
|
| +} // namespace csharp
|
| +} // namespace compiler
|
| } // namespace protobuf
|
| } // namespace google
|
|
|