17 this->profile = profile;
18 this->tags = std::map<std::string, std::string>();
25 return this->profile == profile;
35 int ExtraTags::asInt(std::string tag,
bool *ok)
37 if (tags.find(tag) == tags.end()) {
42 return atoi(tags[tag].c_str());
45 float ExtraTags::asFloat(std::string tag,
bool *ok)
47 if (tags.find(tag) == tags.end()) {
52 return (
float)atof(tags[tag].c_str());
55 std::string ExtraTags::asString(std::string tag,
bool *ok)
57 if (tags.find(tag) == tags.end()) {
68 int tmp = asInt(tag, &ok);
78 int tmp = asInt(tag, &ok);
88 float tmp = asFloat(tag, &ok);
98 int tmp = asInt(tag, &ok);
108 std::string tmp = asString(tag, &ok);
109 return (ok) ? tmp :
data;