void ServerModel::QueueAction(ActionPtr spAction) { // resolve argument ObjectRef& ref = spAction->ArgumentRef(); if (ref.m_sp == NULL) ref.m_sp = m_objectMap.FindObject(ref.m_id).m_sp; spAction->Do(*this); }
///**********************************************************************/// /// class implement end /// ///**********************************************************************/// ///**********************************************************************/// /// class implement begin /// ///**********************************************************************/// void Robot::RunOnce() { ActionQueue::iterator iter = m_actionQueue.begin(); ActionQueue::iterator end = m_actionQueue.end(); for (; iter != end; iter++) { ActionPtr act = *iter; act->Do(); CommandProc(); } CommandProc(); }
/// executes action void Execute(ActionPtr spAction) { ObjectRef& arg = spAction->ArgumentRef(); ATLASSERT(arg.m_sp != NULL); { // lock argument ref Lockable::LockType lock = arg.m_sp->Lock(); spAction->Do(m_model); } }
void Robot::DoAction() { ActionPtr act = GetCurrnetAction(); if (act.get()) act->Do(); Next(); CommandProc(); }