aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/text_format.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/text_format.h')
-rw-r--r--src/google/protobuf/text_format.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/google/protobuf/text_format.h b/src/google/protobuf/text_format.h
index df27710d..00d50ad1 100644
--- a/src/google/protobuf/text_format.h
+++ b/src/google/protobuf/text_format.h
@@ -45,9 +45,20 @@ class LIBPROTOBUF_EXPORT TextFormat {
// Outputs a textual representation of the given message to the given
// output stream.
static bool Print(const Message& message, io::ZeroCopyOutputStream* output);
+
+ // Print the fields in an UnknownFieldSet. They are printed by tag number
+ // only. Embedded messages are heuristically identified by attempting to
+ // parse them.
+ static bool PrintUnknownFields(const UnknownFieldSet& unknown_fields,
+ io::ZeroCopyOutputStream* output);
+
// Like Print(), but outputs directly to a string.
static bool PrintToString(const Message& message, string* output);
+ // Like PrintUnknownFields(), but outputs directly to a string.
+ static bool PrintUnknownFieldsToString(const UnknownFieldSet& unknown_fields,
+ string* output);
+
// Outputs a textual representation of the value of the field supplied on
// the message supplied. For non-repeated fields, an index of -1 must
// be supplied. Note that this method will print the default value for a
@@ -130,7 +141,8 @@ class LIBPROTOBUF_EXPORT TextFormat {
TextGenerator& generator);
// Print the fields in an UnknownFieldSet. They are printed by tag number
- // only.
+ // only. Embedded messages are heuristically identified by attempting to
+ // parse them.
static void PrintUnknownFields(const UnknownFieldSet& unknown_fields,
TextGenerator& generator);