56 void AddTag(
const char* key, V value) {
57 assert(key !=
nullptr);
58 std::ostringstream strm;
60 tags_[key] = strm.str();
64 void AddTag(
const char* key,
const char* value) {
65 assert(key !=
nullptr);
66 assert(value !=
nullptr);
72 void AddTag(
const std::string& key, V value) {
75 AddTag(key.c_str(), value);
110 serialized_ = std::to_string(tags_.size());
112 for (
const auto& tag : tags_) {
113 serialized_ +=
"s\n";
114 serialized_ += tag.first;
115 serialized_ +=
"\n_\n1\n";
116 serialized_ += tag.second;
119 return serialized_.c_str();
123 std::map<std::string, std::string> tags_;
125 mutable std::string serialized_;
Definition CameraImageMetadata.h:25