示例#1
0
文件: bacon.cpp 项目: Oipo/Machine
void Bacon::Run()
{
	running = true;
	while (running)
	{
		//assert( !"NOTI" ); //What is this tomfoolery? Seriously. What is this?

		sf::Event Event;
        while(appWindow->GetEvent(Event))
        {
            if (Event.Type == sf::Event::Closed)
                Shutdown();
        }

		// tick each of our active tasks
		// note that we want the active appstate's tasks,
		// not a fixed list!
		task_list::iterator it;
		for( it = tasks.begin(); it != tasks.end(); it++ )
			(*it)->Tick();


		// call some python code; tick the physics; render the frame

		appWindow->Display();
	}
}
示例#2
0
void dump_tasks() {
  WARNING("---- %d Active Tasks ----\n", all_tasks.size());
  for (task_list::iterator task_it = all_tasks.begin();
      task_it != all_tasks.end(); task_it++) {
    (*task_it)->dump();
  }
}
示例#3
0
文件: task.cpp 项目: Anisha2202/sipp
void abort_all_tasks()
{
    for (task_list::iterator task_it = all_tasks.begin();
         task_it != all_tasks.end();
         task_it = all_tasks.begin()) {
        (*task_it)->abort();
    }
}
示例#4
0
文件: task.cpp 项目: Anisha2202/sipp
task::task()
{
    this->taskit = all_tasks.insert(all_tasks.end(), this);
    add_to_runqueue();
}
示例#5
0
文件: task.cpp 项目: Anisha2202/sipp
/* Put this task in the run queue. */
void task::add_to_runqueue()
{
    this->runit = running_tasks.insert(running_tasks.end(), this);
    this->running = true;
}
示例#6
0
    void delete_tasks () {
	for (task_iter i = m_tasks.begin(); i != m_tasks.end(); i++)
	    delete *i;
    }