diff options
author | xiaofeng@google.com <xiaofeng@google.com@630680e5-0e50-0410-840e-4b1c322b438d> | 2013-01-31 15:52:58 +0000 |
---|---|---|
committer | xiaofeng@google.com <xiaofeng@google.com@630680e5-0e50-0410-840e-4b1c322b438d> | 2013-01-31 15:52:58 +0000 |
commit | 1e5a5e84193575c63126b0e90a2707378a8015ec (patch) | |
tree | bb21578281dacfb042835902361230451b9f967b /src | |
parent | 691f6da30b7d85a2a9560e3ec0eab737ce4c6f4a (diff) | |
download | protobuf-1e5a5e84193575c63126b0e90a2707378a8015ec.tar.gz protobuf-1e5a5e84193575c63126b0e90a2707378a8015ec.tar.bz2 protobuf-1e5a5e84193575c63126b0e90a2707378a8015ec.zip |
Down-integrate from internal branch
Diffstat (limited to 'src')
-rw-r--r-- | src/google/protobuf/message.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/google/protobuf/message.h b/src/google/protobuf/message.h index 77faa9a7..0f90bc1a 100644 --- a/src/google/protobuf/message.h +++ b/src/google/protobuf/message.h @@ -750,6 +750,27 @@ class LIBPROTOBUF_EXPORT MessageFactory { GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageFactory); }; +#define DECLARE_GET_REPEATED_FIELD(TYPE) \ +template<> \ +LIBPROTOBUF_EXPORT \ +const RepeatedField<TYPE>& Reflection::GetRepeatedField<TYPE>( \ + const Message& message, const FieldDescriptor* field) const; \ + \ +template<> \ +LIBPROTOBUF_EXPORT \ +RepeatedField<TYPE>* Reflection::MutableRepeatedField<TYPE>( \ + Message* message, const FieldDescriptor* field) const; + +DECLARE_GET_REPEATED_FIELD(int32) +DECLARE_GET_REPEATED_FIELD(int64) +DECLARE_GET_REPEATED_FIELD(uint32) +DECLARE_GET_REPEATED_FIELD(uint64) +DECLARE_GET_REPEATED_FIELD(float) +DECLARE_GET_REPEATED_FIELD(double) +DECLARE_GET_REPEATED_FIELD(bool) + +#undef DECLARE_GET_REPEATED_FIELD + // ============================================================================= // Implementation details for {Get,Mutable}RawRepeatedPtrField. We provide // specializations for <string>, <StringPieceField> and <Message> and handle |