24 : m_name(
std::move(
name)), m_min(min), m_max(max), m_modelTypes(
std::move(modelTypes))
27 std::ostringstream ostr;
28 ostr <<
"Invalid constructor parameters"
30 throw std::runtime_error(ostr.str());
35 std::vector<std::string> modelTypes)
37 return TagInfo(std::move(
name), 0, -1, std::move(modelTypes));
69 return m_modelTypes.empty() ? true :
Utils::Contains(m_modelTypes, modelType);
77 return m_min == 1 && m_max == 1;
82 return m_name == other.
m_name && m_min == other.
m_min && m_max == other.
m_max
88 return !(*
this == other);
Holds info about single tag for SessionItem.
std::vector< std::string > m_modelTypes
std::vector< std::string > modelTypes() const
bool isValidChild(const std::string &modelType) const
Returns true if given modelType matches the list of possible model types.
bool operator==(const TagInfo &other) const
bool isSinglePropertyTag() const
Returns true if this tag is used to store single properties.
static TagInfo universalTag(std::string name, std::vector< std::string > modelTypes={})
Constructs universal tag intended for unlimited amount of various items.
bool operator!=(const TagInfo &other) const
static TagInfo propertyTag(std::string name, std::string model_type)
Constructs tag intended for single property.
bool Contains(const A &container, const B &element)
Returns true if container contains a given element.
QString const & name(EShape k)