#include "StdAfx.h" #include "StrategyLoop.h" #include "Agent.h" #include "AgentGroup.h" CStrategyLoop::CStrategyLoop(void) : m_Index(0) { } CStrategyLoop::~CStrategyLoop(void) { } /***************************************************************** **【函数名称】 _locateAgent **【函数功能】 得到当前排队策略下可用座席 **【参数】 **【返回值】 ****************************************************************/ CAgent* CStrategyLoop::_locateAgent( CAgentGroup& AgentGroup ) { CAgent* pAgent = NULL; for(int i=0; i= AgentGroup.GetCount()) m_Index = 0; pAgent = AgentGroup[m_Index++]; if(pAgent->isFree()) return pAgent; } // end if return NULL; }