コード例 #1
0
ファイル: Task.cpp プロジェクト: lriki/Lumino
void Task::execute()
{
	m_status = TaskStatus::Running;
	try
	{
		m_action();
		m_status = TaskStatus::Completed;

        // post next tasks
        for (auto& n : m_nextTasks) {
            if (n.dispatcher) {
                n.dispatcher->post(n.task);
            }
        }
	}
	catch (Exception& e)
	{
		m_exception = e.copy();
		m_status = TaskStatus::Faulted;
	}
	catch (...)
	{
		m_exception = LN_NEW Exception();
		m_status = TaskStatus::Faulted;
	}
	m_waiting.unlock();
}
コード例 #2
0
 bool parse(Iterator& begin, Iterator end) const
 {
   Iterator o = begin;
   if (Parser::parse(begin, end))
   {
     m_action(o, begin);
     return true;
   }
   return false;
 }
コード例 #3
0
ファイル: match.hpp プロジェクト: windj007/sparser
 bool operator () (const TPTree &tree) const
 {
     kvalue_type real_val = get(tree, m_key_name);
     if (real_val == m_key_value)
     {
         m_action(tree);
         return true;
     }
     return false;
 }
コード例 #4
0
ファイル: ScopeGuard.hpp プロジェクト: datalinkE/asteroids
 ~ScopeGuard()
 {
     m_action();
 }
コード例 #5
0
ファイル: hud.cpp プロジェクト: Jeija/planether
void TeleportWindowAction::execute(TeleportTarget *target)
{
	m_action(target);
}
コード例 #6
0
	void run(){
		if(m_action)
			m_action();
	}