22 : m_tag_info(
std::move(tag_info))
41 return static_cast<int>(
m_items.size());
94 const bool valid_index = (index >= 0 && index <=
itemCount());
111 return index >= 0 && index < itemCount() ? m_items[static_cast<size_t>(index)] :
nullptr;
bool canInsertItem(const SessionItem *item, int index) const
Returns true if given item can be inserted under given index.
bool maximum_reached() const
Returns true if no more items are allowed.
bool insertItem(SessionItem *item, int index)
Inserts item in a vector of children at given index, returns true in the case of success.
bool minimum_reached() const
Returns true if less items than now is not allowed.
bool is_valid_item(const SessionItem *item) const
Returns true if item's modelType is intended for this tag.
const_iterator end() const
const_iterator begin() const
std::vector< SessionItem * > items() const
Returns vector of items in this container.
container_t::const_iterator const_iterator
int itemCount() const
Returns number of items in given tag.
int indexOfItem(const SessionItem *item) const
Returns index of item in vector of items.
SessionItem * itemAt(int index) const
Returns item at given index. Returns nullptr if index is invalid.
SessionItem * takeItem(int index)
Removes item at given index and returns it to the user.
bool canTakeItem(int index) const
Returns true if item can be taken.
SessionItemContainer(TagInfo tag_info)
std::string name() const
Returns the name of SessionItemTag.
The main object representing an editable/displayable/serializable entity.
model_type modelType() const
Returns item's model type.
Holds info about single tag for SessionItem.
bool isValidChild(const std::string &modelType) const
Returns true if given modelType matches the list of possible model types.
int IndexOfItem(It begin, It end, const T &item)
Returns index corresponding to the first occurance of the item in the container.
materialitems.h Collection of materials to populate MaterialModel.