hd

CellBase.h 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*************************************************************************
  2. 【文件名】 CellBase.h
  3. 【功能模块和目的】 节点基类头文件
  4. 【开发者及日期】 郑石诺 2015/01/24
  5. 【版本】 V1.0.0
  6. 【版权信息】 Copyright (C)2015 河南华谊网络科技有限公司
  7. 【更改记录】
  8. *************************************************************************/
  9. #pragma once
  10. class CIvrFlow;
  11. class IFlowDataProvider;
  12. /*************************************************************************
  13. 【类名】 CCellBase
  14. 【功能】
  15. 【接口说明】 节点基类
  16. 【开发者及日期】 郑石诺 2015/01/24
  17. 【版本】 V1.0.0
  18. 【版权信息】 Copyright (C)2015 河南华谊网络科技有限公司
  19. 【更改记录】
  20. *************************************************************************/
  21. class CCellBase
  22. {
  23. public:
  24. CCellBase(void);
  25. CCellBase(CCellBase& CellBase);
  26. virtual ~CCellBase(void) = 0 {}
  27. // 对外接口
  28. static CCellBase* createCell(const CString& a_Name);
  29. const CString& note(void) const { return m_Note; } // 获取Cell描述
  30. int position(void) const { return m_Pos; } // 获取节点编号
  31. CIvrFlow*& assoIvrFlow(void) { return m_pIvrFlow; } // 保存关联的流程指针
  32. ULONG assoCallID(void); // 返回关联CallID
  33. virtual int onOpResultReturn(CPduEntity *a_pPduEntity) { return CELL_OP_ERROR; } // 处理返回命令
  34. virtual void onSubFLowEnd(void) { }
  35. virtual LPCTSTR name(void) const = 0; // 获取Cell名称
  36. virtual int operate(void) = 0; // 执行Cell
  37. virtual CCellBase * copy(void) = 0; // Cell拷贝
  38. virtual bool fillData(IFlowDataProvider& Provider) = 0; // Cell解析
  39. virtual int maxWaitingTime(void) const = 0; // 避免流程吊死的最大等待间隔,以秒为单位
  40. protected:
  41. void _getCellInfo(CString& InfoBuffer); // 获取Cell信息
  42. protected:
  43. int m_Pos; // 在一个流程文件中的编号
  44. CString m_Note; // 在IVR流程文件中的标题
  45. CIvrFlow* m_pIvrFlow; // 流程指针
  46. };