#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; bool t_b_has_jump = false; pAgent = AgentGroup.GetFreeAgentForLoop(); return pAgent; /* for(int i=0; i= AgentGroup.GetCount()) m_Index = 0; pAgent = AgentGroup[m_Index++]; if (pAgent->queueJump()) { t_b_has_jump = true; continue; } if(pAgent->isFree()) return pAgent; } // end if if (t_b_has_jump == true) { for (int i = 0; i= AgentGroup.GetCount()) m_Index = 0; pAgent = AgentGroup[m_Index++]; if (pAgent->isFree()) return pAgent; } // end if } return NULL; */ }