3 #include <swarmio/data/Variant.pb.h> 4 #include <swarmio/data/discovery/Schema.pb.h> 31 static const char* TypeToString(discovery::Type type);
39 static void WriteEscapedAndQuotedStringToStream(std::ostream& stream,
const std::string& value);
49 static void WriteElementSeparatorToStream(std::ostream& stream,
bool& first,
bool prettyPrint,
int indentationLevel);
59 static bool IsArray(
const Variant& value);
68 static size_t GetCount(
const Variant& value);
77 static Variant::ValueCase GetBaseType(
const Variant& value);
86 static discovery::Schema GetSchemaDescriptor(
const Map& value,
bool includeArraySizes =
false);
95 static discovery::Field GetFieldDescriptor(
const Variant& value,
bool includeArraySizes =
false);
104 static std::string ToString(
const discovery::Schema& value,
bool prettyPrint =
true);
113 static std::string ToString(
const Variant& value,
bool prettyPrint =
true);
122 static std::string ToString(
const Map& value,
bool prettyPrint =
true);
131 static std::string ToString(
const google::protobuf::Map<std::string, swarmio::data::Variant>& value,
bool prettyPrint =
true);
141 static void WriteToStream(std::ostream& stream,
const Variant& value,
bool prettyPrint =
true,
int indentationLevel = 0);
151 static void WriteToStream(std::ostream& stream,
const Map& value,
bool prettyPrint =
true,
int indentationLevel = 0);
161 static void WriteToStream(std::ostream& stream,
const google::protobuf::Map<std::string, swarmio::data::Variant>& value,
bool prettyPrint =
true,
int indentationLevel = 0);
171 static void WriteToStream(std::ostream& stream,
const discovery::Schema& value,
bool prettyPrint =
true,
int indentationLevel = 0);
Helper()
Disable construction.
This Helper class contains commonly used function to manipulate protobuf objects. ...