aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/util/internal/protostream_objectsource.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/util/internal/protostream_objectsource.h')
-rw-r--r--src/google/protobuf/util/internal/protostream_objectsource.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/google/protobuf/util/internal/protostream_objectsource.h b/src/google/protobuf/util/internal/protostream_objectsource.h
index 4a4e6bbf..845437f5 100644
--- a/src/google/protobuf/util/internal/protostream_objectsource.h
+++ b/src/google/protobuf/util/internal/protostream_objectsource.h
@@ -46,7 +46,6 @@
#include <google/protobuf/stubs/statusor.h>
-
namespace google {
namespace protobuf {
class Field;
@@ -61,7 +60,10 @@ namespace converter {
class TypeInfo;
// An ObjectSource that can parse a stream of bytes as a protocol buffer.
-// This implementation uses a tech Type for tag lookup.
+// Its WriteTo() method can be given an ObjectWriter.
+// This implementation uses a google.protobuf.Type for tag and name lookup.
+// The field names are converted into lower camel-case when writing to the
+// ObjectWriter.
//
// Sample usage: (suppose input is: string proto)
// ArrayInputStream arr_stream(proto.data(), proto.size());
@@ -93,7 +95,7 @@ class LIBPROTOBUF_EXPORT ProtoStreamObjectSource : public ObjectSource {
private:
ProtoStreamObjectSource(google::protobuf::io::CodedInputStream* stream,
- TypeInfo* typeinfo,
+ const TypeInfo* typeinfo,
const google::protobuf::Type& type);
// Function that renders a well known type with a modified behavior.
typedef util::Status (*TypeRenderer)(const ProtoStreamObjectSource*,
@@ -226,7 +228,7 @@ class LIBPROTOBUF_EXPORT ProtoStreamObjectSource : public ObjectSource {
// Type information for all the types used in the descriptor. Used to find
// google::protobuf::Type of nested messages/enums.
- TypeInfo* typeinfo_;
+ const TypeInfo* typeinfo_;
// Whether this class owns the typeinfo_ object. If true the typeinfo_ object
// should be deleted in the destructor.
bool own_typeinfo_;