void bear::universe::internal::unselect_item ( item_list& items, item_list::iterator it ) { CLAW_PRECOND( (*it)->get_world_progress_structure().is_selected() ); (*it)->get_world_progress_structure().deinit(); items.erase(it); }
bool bear::universe::internal::select_item( item_list& items, physical_item* it ) { if ( it->get_world_progress_structure().is_selected() ) return false; items.push_back(it); it->get_world_progress_structure().init(); it->get_world_progress_structure().select(); return true; }
size_t Inventory::find( IN const Enum::Storage::Type val, item_list& list) { static const indices::type n = indices::IDX_COMP_STORAGE; containter::nth_index<n>::type& indexBy = m_Container.get<n>(); std::pair< containter::nth_index_iterator<n>::type, containter::nth_index_iterator<n>::type > pair; containter::nth_index_iterator<n>::type iter; pair = indexBy.equal_range(val); for (iter = pair.first; iter != pair.second; ++iter) { WEAK_ITEM p = const_cast<Item*>(*iter); list.push_back(p); } return list.size(); }