diff options
Diffstat (limited to 'src/google/protobuf/compiler/cpp/cpp_field.h')
-rw-r--r-- | src/google/protobuf/compiler/cpp/cpp_field.h | 28 |
1 files changed, 5 insertions, 23 deletions
diff --git a/src/google/protobuf/compiler/cpp/cpp_field.h b/src/google/protobuf/compiler/cpp/cpp_field.h index 96c2963..c303a33 100644 --- a/src/google/protobuf/compiler/cpp/cpp_field.h +++ b/src/google/protobuf/compiler/cpp/cpp_field.h @@ -1,6 +1,6 @@ // Protocol Buffers - Google's data interchange format // Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ +// http://code.google.com/p/protobuf/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -36,11 +36,10 @@ #define GOOGLE_PROTOBUF_COMPILER_CPP_FIELD_H__ #include <map> -#include <memory> #include <string> +#include <google/protobuf/stubs/common.h> #include <google/protobuf/descriptor.h> -#include <google/protobuf/compiler/cpp/cpp_options.h> namespace google { namespace protobuf { @@ -58,11 +57,7 @@ namespace cpp { // ['name', 'index', 'number', 'classname', 'declared_type', 'tag_size', // 'deprecation']. void SetCommonFieldVariables(const FieldDescriptor* descriptor, - map<string, string>* variables, - const Options& options); - -void SetCommonOneofFieldVariables(const FieldDescriptor* descriptor, - map<string, string>* variables); + map<string, string>* variables); class FieldGenerator { public: @@ -74,11 +69,6 @@ class FieldGenerator { // class. virtual void GeneratePrivateMembers(io::Printer* printer) const = 0; - // Generate static default variable for this field. These are placed inside - // the message class. Most field types don't need this, so the default - // implementation is empty. - virtual void GenerateStaticMembers(io::Printer* printer) const {} - // Generate prototypes for all of the accessor functions related to this // field. These are placed inside the class definition. virtual void GenerateAccessorDeclarations(io::Printer* printer) const = 0; @@ -124,13 +114,6 @@ class FieldGenerator { // Most field types don't need this, so the default implementation is empty. virtual void GenerateDestructorCode(io::Printer* printer) const {} - // Generate code that allocates the fields's default instance. - virtual void GenerateDefaultInstanceAllocator(io::Printer* printer) const {} - - // Generate code that should be run when ShutdownProtobufLibrary() is called, - // to delete all dynamically-allocated objects. - virtual void GenerateShutdownCode(io::Printer* printer) const {} - // Generate lines to decode this field, which will be placed inside the // message's MergeFromCodedStream() method. virtual void GenerateMergeFromCodedStream(io::Printer* printer) const = 0; @@ -161,7 +144,7 @@ class FieldGenerator { // Convenience class which constructs FieldGenerators for a Descriptor. class FieldGeneratorMap { public: - explicit FieldGeneratorMap(const Descriptor* descriptor, const Options& options); + explicit FieldGeneratorMap(const Descriptor* descriptor); ~FieldGeneratorMap(); const FieldGenerator& get(const FieldDescriptor* field) const; @@ -170,8 +153,7 @@ class FieldGeneratorMap { const Descriptor* descriptor_; scoped_array<scoped_ptr<FieldGenerator> > field_generators_; - static FieldGenerator* MakeGenerator(const FieldDescriptor* field, - const Options& options); + static FieldGenerator* MakeGenerator(const FieldDescriptor* field); GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FieldGeneratorMap); }; |