中航光电的中间件仓库

AgentGroup.h 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*************************************************************************
  2. 【文件名】 AgentGroup.h
  3. 【功能模块和目的】 座席组类头文件
  4. 【开发者及日期】 郑石诺 2015/07/27
  5. 【版本】 V1.0.0
  6. 【版权信息】 Copyright (C)2015 河南华谊网络科技有限公司
  7. 【更改记录】
  8. *************************************************************************/
  9. #pragma once
  10. #include <map>
  11. class CAgent;
  12. class CStrategyAD;
  13. /*************************************************************************
  14. 【类名】 CAgentGroup
  15. 【功能】
  16. 【接口说明】 座席组类
  17. 【开发者及日期】 郑石诺 2015/07/27
  18. 【版本】 V1.0.0
  19. 【版权信息】 Copyright (C)2015 河南华谊网络科技有限公司
  20. 【更改记录】
  21. *************************************************************************/
  22. class CAgentGroup : public CArray<CAgent*, CAgent*>
  23. {
  24. public:
  25. CAgentGroup(void);
  26. virtual ~CAgentGroup(void);
  27. void add(CAgent* a_pAgent);
  28. bool remove(CAgent* a_pAgent);
  29. void clear(void);
  30. bool isNoFreeAgent(void); // 是否座席全忙
  31. QUEUE_AGENT_RESULT distributeAgent(CStrategyAD* pStrategy, const CString& InfoEx, UINT& Agent, UINT& Exten);
  32. CAgent* GetFreeAgentForLoop();
  33. CAgent* GetFreeAgentForLoopByAgentId(); // 2020-01-13通过座席ID顺序分配
  34. private:
  35. CCriticalSection m_CsLock4Distribute;
  36. };