aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/util/internal/default_value_objectwriter.h
diff options
context:
space:
mode:
authorJisi Liu <jisi.liu@gmail.com>2017-07-18 15:38:30 -0700
committerJisi Liu <jisi.liu@gmail.com>2017-07-18 15:38:30 -0700
commit09354db1434859a31a3c81abebcc4018d42f2715 (patch)
treeb87c7cdc2255e6c8062ab92b4082665cd698d753 /src/google/protobuf/util/internal/default_value_objectwriter.h
parent9053033a5076f82cf18b823c31f352e95e5bfd8d (diff)
downloadprotobuf-09354db1434859a31a3c81abebcc4018d42f2715.tar.gz
protobuf-09354db1434859a31a3c81abebcc4018d42f2715.tar.bz2
protobuf-09354db1434859a31a3c81abebcc4018d42f2715.zip
Merge from Google internal for 3.4 release
Diffstat (limited to 'src/google/protobuf/util/internal/default_value_objectwriter.h')
-rw-r--r--src/google/protobuf/util/internal/default_value_objectwriter.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/google/protobuf/util/internal/default_value_objectwriter.h b/src/google/protobuf/util/internal/default_value_objectwriter.h
index ef2cc981..09c6d23f 100644
--- a/src/google/protobuf/util/internal/default_value_objectwriter.h
+++ b/src/google/protobuf/util/internal/default_value_objectwriter.h
@@ -172,7 +172,7 @@ class LIBPROTOBUF_EXPORT DefaultValueObjectWriter : public ObjectWriter {
// If this node is a leaf (has data), writes the current node to the
// ObjectWriter; if not, then recursively writes the children to the
// ObjectWriter.
- void WriteTo(ObjectWriter* ow);
+ virtual void WriteTo(ObjectWriter* ow);
// Accessors
const string& name() const { return name_; }
@@ -262,6 +262,10 @@ class LIBPROTOBUF_EXPORT DefaultValueObjectWriter : public ObjectWriter {
static DataPiece CreateDefaultDataPieceForField(
const google::protobuf::Field& field, const TypeInfo* typeinfo);
+ protected:
+ // Returns a pointer to current Node in tree.
+ Node* current() { return current_; }
+
private:
// Populates children of "node" if it is an "any" Node and its real type has
// been given.