Changeset View
Changeset View
Standalone View
Standalone View
stepcore/itemgroup.h
Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Line(s) | 45 | public: | |||
---|---|---|---|---|---|
52 | 52 | | |||
53 | /** Assignment operator (deep copy) | 53 | /** Assignment operator (deep copy) | ||
54 | * \warning Do not call this on groups already attached to the world */ | 54 | * \warning Do not call this on groups already attached to the world */ | ||
55 | ItemGroup& operator=(const ItemGroup& group); | 55 | ItemGroup& operator=(const ItemGroup& group); | ||
56 | 56 | | |||
57 | /** Get list of all direct child items in the ItemGroup */ | 57 | /** Get list of all direct child items in the ItemGroup */ | ||
58 | const ItemList& items() const { return _items; } | 58 | const ItemList& items() const { return _items; } | ||
59 | 59 | | |||
60 | bool contains(const Item* item) const { return std::find(_items.begin(), _items.end(), item) != _items.end(); } | ||||
61 | | ||||
60 | /** Get list of all items in the ItemGroup | 62 | /** Get list of all items in the ItemGroup | ||
61 | * \note This operation takes long time since it | 63 | * \note This operation takes long time since it | ||
62 | * recursively traverses all child groups */ | 64 | * recursively traverses all child groups */ | ||
63 | ItemList allItems() const { ItemList l; allItems(&l); return l; } | 65 | ItemList allItems() const { ItemList l; allItems(&l); return l; } | ||
64 | /** Get list of all items in the ItemGroup | 66 | /** Get list of all items in the ItemGroup | ||
65 | * \param items Array to store items | 67 | * \param items Array to store items | ||
66 | * \note This operation takes long time since it | 68 | * \note This operation takes long time since it | ||
67 | * recursively traverses all child groups */ | 69 | * recursively traverses all child groups */ | ||
Show All 37 Lines |