aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/compiler/cpp/cpp_field.h
diff options
context:
space:
mode:
authorjieluo@google.com <jieluo@google.com@630680e5-0e50-0410-840e-4b1c322b438d>2014-07-18 00:47:59 +0000
committerjieluo@google.com <jieluo@google.com@630680e5-0e50-0410-840e-4b1c322b438d>2014-07-18 00:47:59 +0000
commit4de8f55113007fdc8e34107950e605fc0209d465 (patch)
tree92b7da8757a7740d9e1f2d3ead233542947d8c8c /src/google/protobuf/compiler/cpp/cpp_field.h
parentc5553a3d18f80132b9079c5504bc0aa1f7f950a0 (diff)
downloadprotobuf-4de8f55113007fdc8e34107950e605fc0209d465.tar.gz
protobuf-4de8f55113007fdc8e34107950e605fc0209d465.tar.bz2
protobuf-4de8f55113007fdc8e34107950e605fc0209d465.zip
down integrate to svn
Diffstat (limited to 'src/google/protobuf/compiler/cpp/cpp_field.h')
-rw-r--r--src/google/protobuf/compiler/cpp/cpp_field.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/google/protobuf/compiler/cpp/cpp_field.h b/src/google/protobuf/compiler/cpp/cpp_field.h
index f7d99b15..e4340672 100644
--- a/src/google/protobuf/compiler/cpp/cpp_field.h
+++ b/src/google/protobuf/compiler/cpp/cpp_field.h
@@ -36,9 +36,9 @@
#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>
@@ -61,6 +61,9 @@ void SetCommonFieldVariables(const FieldDescriptor* descriptor,
map<string, string>* variables,
const Options& options);
+void SetCommonOneofFieldVariables(const FieldDescriptor* descriptor,
+ map<string, string>* variables);
+
class FieldGenerator {
public:
FieldGenerator() {}
@@ -71,6 +74,11 @@ 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;