31 this->profile = profile;
32 this->tags = std::map<std::string, std::string>();
39 return this->profile == profile;
49 int ExtraTags::asInt(std::string tag,
bool *ok)
51 if (tags.find(tag) == tags.end()) {
56 return atoi(tags[tag].c_str());
59 float ExtraTags::asFloat(std::string tag,
bool *ok)
61 if (tags.find(tag) == tags.end()) {
66 return (
float)atof(tags[tag].c_str());
69 std::string ExtraTags::asString(std::string tag,
bool *ok)
71 if (tags.find(tag) == tags.end()) {
82 int tmp = asInt(tag, &ok);
92 int tmp = asInt(tag, &ok);
102 float tmp = asFloat(tag, &ok);
112 int tmp = asInt(tag, &ok);
122 std::string tmp = asString(tag, &ok);
123 return (ok) ? tmp :
data;