ProtoCvt.h 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. #ifndef __MAS_PROTO_CVT_H
  2. #define __MAS_PROTO_CVT_H
  3. #include "DBTables.h"
  4. #include "MAS_AlgoDef.h"
  5. #include "HTTP_Definition.h"
  6. NAMESPACE_MAS_BEGIN
  7. class ProtoCvt {
  8. public:
  9. static void Json2Tbl(
  10. const UserInfo & from, TblUserInfoItem & to);
  11. static void Tbl2Json(
  12. const TblUserInfoItem & from, UserInfo & to);
  13. static void Json2Tbl(
  14. const SceneInfo & from, TblSceneInfoItem & to);
  15. static void Tbl2Json(
  16. const TblSceneInfoItem & from, SceneInfo & to);
  17. static void Json2Tbl(
  18. const StrategyInfo & from, TblStrategyInfoItem & to);
  19. static void Tbl2Json(
  20. const TblStrategyInfoItem & from, StrategyInfo & to);
  21. static void Json2Tbl(
  22. const SceneGroupInfo & from,
  23. TblSceneGroupItem & to,
  24. std::list<TblSgroupSceneItem> & rels);
  25. static void Tbl2Json(
  26. TblSceneGroupItem & from,
  27. std::list<TblSgroupSceneItem> & rels,
  28. SceneGroupInfo & to);
  29. static void Json2Tbl(
  30. const SysConfig & from, TblSysConfigItem & to);
  31. static void Tbl2Json(
  32. const TblSysConfigItem & from, SysConfig & to);
  33. static void Json2Tbl(
  34. const MediaSrcInfo & from, TblMediaSrcInfoItem & to);
  35. static void Tbl2Json(
  36. const TblMediaSrcInfoItem & from, MediaSrcInfo & to);
  37. static void Json2Tbl(
  38. const MediaRscInfo & from, TblMediaRscInfoItem & to);
  39. static void Tbl2Json(
  40. const TblMediaRscInfoItem & from, MediaRscInfo & to);
  41. static void Json2Tbl(
  42. const DetectorInfo & from, TblDetectorInfoItem & to);
  43. static void Tbl2Json(
  44. const TblDetectorInfoItem & from, DetectorInfo & to);
  45. static void Json2Tbl(
  46. const PlanInfo & from, TblPlanInfoItem & to);
  47. static void Tbl2Json(
  48. const TblPlanInfoItem & from, PlanInfo & to);
  49. static void Json2Tbl(
  50. const EventRecord & from, TblEventRecordItem & to);
  51. static void Tbl2Json(
  52. const TblEventRecordItem & from, EventRecord & to);
  53. static void Json2Tbl(
  54. const MediaRecord & from, TblMediaRecordItem & to);
  55. static void Tbl2Json(
  56. const TblMediaRecordItem & from, MediaRecord & to);
  57. static void Json2Tbl(
  58. const OpRecord & from, TblOpRecordItem & to);
  59. static void Tbl2Json(
  60. const TblOpRecordItem & from, OpRecord & to);
  61. static void Json2Tbl(
  62. const PerformanceRecord & from, TblPerformanceRecordItem & to);
  63. static void Tbl2Json(
  64. const TblPerformanceRecordItem & from, PerformanceRecord & to);
  65. static void Json2Tbl(
  66. const SceneDetectorInfo & from, TblSceneDetectorInfoItem & to);
  67. static void Tbl2Json(
  68. const TblSceneDetectorInfoItem & from, SceneDetectorInfo & to);
  69. static void Cvt(const class ExcepInfo & from, TZ_INT type,
  70. TZ_HANDLE tag, TZ_HANDLE stag, PipeException & to);
  71. static void Cvt(const QueryCondition & from,
  72. ORDER_PAIR & order, std::vector<sdb::ValuePair> & pairs);
  73. };
  74. NAMESPACE_MAS_END
  75. #endif