diff options
author | xiaofeng@google.com <xiaofeng@google.com@630680e5-0e50-0410-840e-4b1c322b438d> | 2012-09-22 02:40:50 +0000 |
---|---|---|
committer | xiaofeng@google.com <xiaofeng@google.com@630680e5-0e50-0410-840e-4b1c322b438d> | 2012-09-22 02:40:50 +0000 |
commit | b55a20fa2c669b181f47ea9219b8e74d1263da19 (patch) | |
tree | 3936a0e7c22196587a6d8397372de41434fe2129 /src/google/protobuf/wire_format_lite.h | |
parent | 9ced30caf94bb4e7e9629c199679ff44e8ca7389 (diff) | |
download | protobuf-b55a20fa2c669b181f47ea9219b8e74d1263da19.tar.gz protobuf-b55a20fa2c669b181f47ea9219b8e74d1263da19.tar.bz2 protobuf-b55a20fa2c669b181f47ea9219b8e74d1263da19.zip |
Down-integrate from internal branch
Diffstat (limited to 'src/google/protobuf/wire_format_lite.h')
-rw-r--r-- | src/google/protobuf/wire_format_lite.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/google/protobuf/wire_format_lite.h b/src/google/protobuf/wire_format_lite.h index e3d5b2d8..cb4fc918 100644 --- a/src/google/protobuf/wire_format_lite.h +++ b/src/google/protobuf/wire_format_lite.h @@ -41,16 +41,14 @@ #define GOOGLE_PROTOBUF_WIRE_FORMAT_LITE_H__ #include <string> +#include <google/protobuf/stubs/common.h> #include <google/protobuf/message_lite.h> +#include <google/protobuf/io/coded_stream.h> // for CodedOutputStream::Varint32Size namespace google { namespace protobuf { template <typename T> class RepeatedField; // repeated_field.h - namespace io { - class CodedInputStream; // coded_stream.h - class CodedOutputStream; // coded_stream.h - } } namespace protobuf { @@ -477,6 +475,10 @@ class LIBPROTOBUF_EXPORT WireFormatLite { template<typename MessageType> static inline int MessageSizeNoVirtual(const MessageType& value); + // Given the length of data, calculate the byte size of the data on the + // wire if we encode the data as a length delimited field. + static inline int LengthDelimitedSize(int length); + private: // A helper method for the repeated primitive reader. This method has // optimizations for primitive types that have fixed size on the wire, and |