13 #include <boost/lexical_cast.hpp> 14 #include <boost/variant.hpp> 15 #include <glog/logging.h> 20 using namespace StructuredHeaders;
23 const std::vector<StructuredHeaderItem>& input) {
29 for (
auto it = input.begin(); it != input.end(); it++) {
30 auto err = encodeItem(*it);
36 outputStream_ <<
", ";
50 for (
auto it = input.begin(); it != input.end(); it++) {
51 auto err = encodeIdentifier(it->first);
58 err = encodeItem(it->second);
64 outputStream_ <<
", ";
78 for (
auto it1 = input.begin(); it1 != input.end(); it1++) {
79 auto err = encodeIdentifier(it1->identifier);
84 for (
auto it2 = it1->parameterMap.begin();
85 it2 != it1->parameterMap.end(); it2++) {
87 outputStream_ <<
"; ";
89 err = encodeIdentifier(it2->first);
96 err = encodeItem(it2->second);
104 outputStream_ <<
", ";
114 outputStream_(&buf_) {
128 case StructuredHeaderItem::Type::INT64:
130 case StructuredHeaderItem::Type::DOUBLE:
132 case StructuredHeaderItem::Type::BINARYCONTENT:
134 boost::get<std::string>(input.
value));
139 return EncodeError::OK;
149 return EncodeError::OK;
159 for (
char c : input) {
160 if (
c ==
'"' ||
c ==
'\\') {
168 return EncodeError::OK;
175 return EncodeError::OK;
182 return EncodeError::OK;
192 return EncodeError::OK;
200 LOG_EVERY_N(
ERROR, 1000) <<
"Error message: " <<
207 LOG_EVERY_N(
ERROR, 1000) <<
"Error message: " <<
constexpr detail::Map< Move > move