Пример #1
0
KSGTaskManager::PtrType KSGTaskManager::AddSysTask(int code,const std::string& content
								   ,KSGDeviceNode* node,TaskPriority pri /*= ptNormal*/,void *arg)
{
	int taskid;
	switch(code)
	{
		case TK_COLLSERIAL_TASK:
			taskid = node->GetDevId()*10 + 1;
			taskid = -taskid;
			break;
		case TK_HEARTBEAT_TASK:
			taskid = node->GetDevId()*10 + 2;
			taskid = -taskid;
			break;
		case TK_BATCH_DL_BLKCARD:
			taskid = node->GetDevId()*10 + 3;
			taskid = -taskid;
			break;
		default:
			taskid = GenTaskId();
			break;
	}
	PtrType task = NewTask(taskid,code,content,node,pri,arg);
	return task;
}
Пример #2
0
	cElTask   & cEl_GPAO::GetOrCreate
				(
					 const std::string &aName,
					 const std::string & aBuildingRule
				)
#endif
{
    cElTask * aTask = mDico[aName];
    return aTask ? *aTask : NewTask(aName,aBuildingRule);
}
Пример #3
0
  //
  // Load
  //
  // Load a task
  //
  Task * LoadTask(GameObj *subject, FScope *fScope)
  {
    const char *name = fScope->NextArgString();
    U32 id = fScope->NextArgInteger();

    // Create a new task using the type given
    Task *task = NewTask(subject, name, id);

    // Load this task
    ASSERT(task)
    task->Load(fScope);

    return (task);
  }
Пример #4
0
cEl_GPAO::cEl_GPAO()
{
    NewTask("all","");
}