Ejemplo n.º 1
0
	bool process(char ch)
	{
		auto itr(_handlers.find({ch}));
		if (itr == _handlers.end())
		{
			_ostr << "Command not found";
			return true;
		}
		return (this->*itr->second)();
	}
void EventPoller::Update()
{
	SDL_Event event;
	while (SDL_PollEvent(&event))
	{
		Handlers h = m_handlers;

		for (Handlers::iterator it = h.begin();
			it != h.end();
			++it)
		{
			(*it)->HandleEvent(event);
		}
	}
}
Ejemplo n.º 3
0
Archivo: myfix.hpp Proyecto: BoSiC/fix8
	bool process(char ch)
	{
		auto itr(_handlers.find({ch}));
		return itr == _handlers.end() ? true : (this->*itr->second)();
	}