| Index: third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_oneof.h
|
| diff --git a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_options.h b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_oneof.h
|
| similarity index 62%
|
| copy from third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_options.h
|
| copy to third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_oneof.h
|
| index 787706629bd10fc72eb7811d9498f19dd0524d11..bcba82da57abfcea9f03f53807670a592daffda2 100644
|
| --- a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_options.h
|
| +++ b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_oneof.h
|
| @@ -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,31 +28,50 @@
|
| // (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: rennie@google.com (Jeffrey Rennie)
|
| -
|
| -#ifndef GOOGLE_PROTOBUF_COMPILER_CPP_OPTIONS_H__
|
| -#define GOOGLE_PROTOBUF_COMPILER_CPP_OPTIONS_H__
|
| +#ifndef GOOGLE_PROTOBUF_COMPILER_OBJECTIVEC_ONEOF_H__
|
| +#define GOOGLE_PROTOBUF_COMPILER_OBJECTIVEC_ONEOF_H__
|
|
|
| #include <string>
|
| +#include <set>
|
| +#include <vector>
|
| +#include <google/protobuf/descriptor.h>
|
|
|
| -#include <google/protobuf/stubs/common.h>
|
| namespace google {
|
| namespace protobuf {
|
| +namespace io {
|
| +class Printer; // printer.h
|
| +}
|
| +}
|
| +
|
| +namespace protobuf {
|
| namespace compiler {
|
| -namespace cpp {
|
| -
|
| -// Generator options:
|
| -struct Options {
|
| - Options() : safe_boundary_check(false) {
|
| - }
|
| - string dllexport_decl;
|
| - bool safe_boundary_check;
|
| +namespace objectivec {
|
| +
|
| +class OneofGenerator {
|
| + public:
|
| + explicit OneofGenerator(const OneofDescriptor* descriptor);
|
| + ~OneofGenerator();
|
| +
|
| + void SetOneofIndexBase(int index_base);
|
| +
|
| + void GenerateCaseEnum(io::Printer* printer);
|
| +
|
| + void GeneratePublicCasePropertyDeclaration(io::Printer* printer);
|
| + void GenerateClearFunctionDeclaration(io::Printer* printer);
|
| +
|
| + void GeneratePropertyImplementation(io::Printer* printer);
|
| + void GenerateClearFunctionImplementation(io::Printer* printer);
|
| + void GenerateDescription(io::Printer* printer);
|
| +
|
| + private:
|
| + const OneofDescriptor* descriptor_;
|
| + map<string, string> variables_;
|
| +
|
| + GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(OneofGenerator);
|
| };
|
|
|
| -} // namespace cpp
|
| +} // namespace objectivec
|
| } // namespace compiler
|
| } // namespace protobuf
|
| -
|
| -
|
| } // namespace google
|
| -#endif // GOOGLE_PROTOBUF_COMPILER_CPP_OPTIONS_H__
|
| +#endif // GOOGLE_PROTOBUF_COMPILER_OBJECTIVEC_ONEOF_H__
|
|
|