Ejemplo n.º 1
0
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);
}
Ejemplo n.º 2
0
	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;
	}
Ejemplo n.º 3
0
static void fillServers(SlotMap& m)
{
    std::fill(m.begin(), m.end(), nullptr);
}