14 #ifndef smtk_attribute_Tag_h
15 #define smtk_attribute_Tag_h
17 #include "smtk/CoreExports.h"
18 #include "smtk/SystemConfig.h"
29 class SMTKCORE_EXPORT
Tag
32 Tag(
const std::string& name)
37 Tag(
const std::string& name,
const std::set<std::string>& values)
43 Tag(
const std::string& name, std::set<std::string>&& values)
49 const std::string& name()
const {
return m_name; }
50 const std::set<std::string>& values()
const {
return m_values; }
51 std::set<std::string>& values() {
return m_values; }
53 bool add(
const std::string& value) {
return m_values.insert(value).second; }
55 bool remove(
const std::string& value) {
return m_values.erase(value) > 0; }
57 bool contains(
const std::string& value)
const {
return m_values.find(value) != m_values.end(); }
59 bool operator<(
const Tag& rhs)
const {
return m_name < rhs.m_name; }
63 std::set<std::string> m_values;
66 typedef std::set<Tag> Tags;