Index: third_party/protobuf/src/google/protobuf/io/printer.cc |
diff --git a/third_party/protobuf/src/google/protobuf/io/printer.cc b/third_party/protobuf/src/google/protobuf/io/printer.cc |
index d2bf3f549f09fe75263e61670523048a39aca965..7d886506265fc92c4cf2d238bd5b187b6d442a55 100644 |
--- a/third_party/protobuf/src/google/protobuf/io/printer.cc |
+++ b/third_party/protobuf/src/google/protobuf/io/printer.cc |
@@ -1,6 +1,6 @@ |
// Protocol Buffers - Google's data interchange format |
// Copyright 2008 Google Inc. All rights reserved. |
-// http://code.google.com/p/protobuf/ |
+// https://developers.google.com/protocol-buffers/ |
// |
// Redistribution and use in source and binary forms, with or without |
// modification, are permitted provided that the following conditions are |
@@ -34,6 +34,7 @@ |
#include <google/protobuf/io/printer.h> |
#include <google/protobuf/io/zero_copy_stream.h> |
+#include <google/protobuf/stubs/logging.h> |
#include <google/protobuf/stubs/common.h> |
namespace google { |
@@ -142,6 +143,91 @@ void Printer::Print(const char* text, |
Print(vars, text); |
} |
+void Printer::Print(const char* text, |
+ const char* variable1, const string& value1, |
+ const char* variable2, const string& value2, |
+ const char* variable3, const string& value3, |
+ const char* variable4, const string& value4) { |
+ map<string, string> vars; |
+ vars[variable1] = value1; |
+ vars[variable2] = value2; |
+ vars[variable3] = value3; |
+ vars[variable4] = value4; |
+ Print(vars, text); |
+} |
+ |
+void Printer::Print(const char* text, |
+ const char* variable1, const string& value1, |
+ const char* variable2, const string& value2, |
+ const char* variable3, const string& value3, |
+ const char* variable4, const string& value4, |
+ const char* variable5, const string& value5) { |
+ map<string, string> vars; |
+ vars[variable1] = value1; |
+ vars[variable2] = value2; |
+ vars[variable3] = value3; |
+ vars[variable4] = value4; |
+ vars[variable5] = value5; |
+ Print(vars, text); |
+} |
+ |
+void Printer::Print(const char* text, |
+ const char* variable1, const string& value1, |
+ const char* variable2, const string& value2, |
+ const char* variable3, const string& value3, |
+ const char* variable4, const string& value4, |
+ const char* variable5, const string& value5, |
+ const char* variable6, const string& value6) { |
+ map<string, string> vars; |
+ vars[variable1] = value1; |
+ vars[variable2] = value2; |
+ vars[variable3] = value3; |
+ vars[variable4] = value4; |
+ vars[variable5] = value5; |
+ vars[variable6] = value6; |
+ Print(vars, text); |
+} |
+ |
+void Printer::Print(const char* text, |
+ const char* variable1, const string& value1, |
+ const char* variable2, const string& value2, |
+ const char* variable3, const string& value3, |
+ const char* variable4, const string& value4, |
+ const char* variable5, const string& value5, |
+ const char* variable6, const string& value6, |
+ const char* variable7, const string& value7) { |
+ map<string, string> vars; |
+ vars[variable1] = value1; |
+ vars[variable2] = value2; |
+ vars[variable3] = value3; |
+ vars[variable4] = value4; |
+ vars[variable5] = value5; |
+ vars[variable6] = value6; |
+ vars[variable7] = value7; |
+ Print(vars, text); |
+} |
+ |
+void Printer::Print(const char* text, |
+ const char* variable1, const string& value1, |
+ const char* variable2, const string& value2, |
+ const char* variable3, const string& value3, |
+ const char* variable4, const string& value4, |
+ const char* variable5, const string& value5, |
+ const char* variable6, const string& value6, |
+ const char* variable7, const string& value7, |
+ const char* variable8, const string& value8) { |
+ map<string, string> vars; |
+ vars[variable1] = value1; |
+ vars[variable2] = value2; |
+ vars[variable3] = value3; |
+ vars[variable4] = value4; |
+ vars[variable5] = value5; |
+ vars[variable6] = value6; |
+ vars[variable7] = value7; |
+ vars[variable8] = value8; |
+ Print(vars, text); |
+} |
+ |
void Printer::Indent() { |
indent_ += " "; |
} |