static void ConnectSignal( const std::string & valuestr, const SlotMap & slotmap, Signal & signal) { typename SlotMap::const_iterator it = slotmap.find(valuestr); if (it != slotmap.end()) it->second->connect(signal); }
const Property Inventory::getProperty(const CeGuiString& key) const { Property prop; if (key == Inventory::PROPERTY_CONTENT) { PropertyMap contentProp; SlotMap slots = getAllSlots(); for (SlotMap::const_iterator it = slots.begin(); it != slots.end(); ++it) { Slot* curSlot = (*it).second; if (curSlot->getItem()) { contentProp[(*it).first] = GameObjectManager::getSingleton().toProperty(curSlot->getItem()); } } prop.setValue(contentProp); } return prop; }
static void fillServers(SlotMap& m) { std::fill(m.begin(), m.end(), nullptr); }