예제 #1
0
파일: myfix.hpp 프로젝트: Fantasticer/fix8
	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);
		}
	}
}
예제 #3
0
  // ----------------------------
  // VolumeFile_IO::removeHandler
  // ----------------------------
  // Purpose:
  //   Convenence function for removing objects from the map.
  // ---- Change History ----
  // 11/13/2009 -- Joe R. -- Initially implemented.
  void VolumeFile_IO::removeHandler(const std::string& id)
  {
    for(HandlerMap::iterator i = handlerMap().begin();
	i != handlerMap().end();
	i++)
      {
	Handlers handlers;
	for(Handlers::iterator j = i->second.begin();
	    j != i->second.end();
	    j++)
	  {
	    if((*j)->id() != id)
	      handlers.push_back(*j);
	  }
	i->second = handlers;
      }    
  }
예제 #4
0
  // ----------------------------
  // VolumeFile_IO::removeHandler
  // ----------------------------
  // Purpose:
  //   Convenence function for removing objects from the map.
  // ---- Change History ----
  // 11/13/2009 -- Joe R. -- Initially implemented.
  void VolumeFile_IO::removeHandler(const Ptr& vfio)
  {
    for(HandlerMap::iterator i = handlerMap().begin();
	i != handlerMap().end();
	i++)
      {
	Handlers handlers;
	for(Handlers::iterator j = i->second.begin();
	    j != i->second.end();
	    j++)
	  {
	    if(*j != vfio)
	      handlers.push_back(*j);
	  }
	i->second = handlers;
      }
  }
예제 #5
0
파일: hftest.hpp 프로젝트: 6qat/fix8
	bool process(const char ch) { return (this->*_handlers.find_ref(MenuItem(ch, std::string())))(); }
예제 #6
0
파일: myfix.hpp 프로젝트: BoSiC/fix8
	bool process(char ch)
	{
		auto itr(_handlers.find({ch}));
		return itr == _handlers.end() ? true : (this->*itr->second)();
	}