aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/message.h
diff options
context:
space:
mode:
authorGravatar kenton@google.com <kenton@google.com@630680e5-0e50-0410-840e-4b1c322b438d>2009-07-24 01:00:35 +0000
committerGravatar kenton@google.com <kenton@google.com@630680e5-0e50-0410-840e-4b1c322b438d>2009-07-24 01:00:35 +0000
commitd2fd0638c309113ccae3731a58e30419f522269a (patch)
tree19765ef6018015a1ae7a84ead0dd13592c2442b5 /src/google/protobuf/message.h
parent31afcd730b279a6aa810cee447757725a7031353 (diff)
Down-integrate some code from an internal branch. (More to come.)
Diffstat (limited to 'src/google/protobuf/message.h')
-rw-r--r--src/google/protobuf/message.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/google/protobuf/message.h b/src/google/protobuf/message.h
index 0f0ef887..41716057 100644
--- a/src/google/protobuf/message.h
+++ b/src/google/protobuf/message.h
@@ -223,6 +223,11 @@ class LIBPROTOBUF_EXPORT Message {
// See Reflection::GetUnknownFields() for more on unknown fields.
virtual void DiscardUnknownFields();
+ // Computes (an estimate of) the total number of bytes currently used for
+ // storing the message in memory. The default implementation calls the
+ // Reflection object's SpaceUsed() method.
+ virtual int SpaceUsed() const;
+
// Debugging -------------------------------------------------------
// Generates a human readable form of this message, useful for debugging
@@ -362,11 +367,6 @@ class LIBPROTOBUF_EXPORT Message {
// this, it MUST override SetCachedSize().
virtual int ByteSize() const;
- // Computes (an estimate of) the total number of bytes currently used for
- // storing the message in memory. The default implementation calls the
- // Reflection object's SpaceUsed() method.
- virtual int SpaceUsed() const;
-
// Serializes the message without recomputing the size. The message must
// not have changed since the last call to ByteSize(); if it has, the results
// are undefined.