xxx_decode_result.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. // // ******************************************************************
  2. // // /\ /| @File XXX_decode_result.h
  3. // // \ V/ @Brief
  4. // // | "") @Author lijinwen, ghz005@uni-trend.com.cn
  5. // // / | @Creation 2024-05-17
  6. // // / \\ @Modified 2024-06-24
  7. // // *(__\_\
  8. // // ******************************************************************
  9. #pragma once
  10. //#include <utility>
  11. //#include "protocol_XXX_enums.h"
  12. #include "xxx_decode_event.h"
  13. #include "../decode_result.h"
  14. //#include "XXX_packet.h"
  15. //#include "../decode_event.h"
  16. namespace Protocol
  17. {
  18. class XXXDecodeResultCell : DecodeResultCell
  19. {
  20. };
  21. struct XXXDecodeResult //: DecodeResult
  22. {
  23. bool decode_result_need_update = false;
  24. bool decode_event_need_update = false;
  25. XXXDecodeResultCell* decode_result_cells_ptr; //解码数据结果指针
  26. XXXDecodeEvent* decode_events_ptr; //解码结果事件指针
  27. uint64_t decode_result_count; //结果数量
  28. uint64_t decode_event_count; //事件数量
  29. XXXDecodeResult() : decode_result_cells_ptr(nullptr), decode_events_ptr(nullptr), decode_result_count(0),
  30. decode_event_count(0)
  31. {
  32. }
  33. XXXDecodeResult(const XXXDecodeResult& result)
  34. {
  35. decode_result_need_update = result.decode_result_need_update;
  36. decode_event_need_update = result.decode_event_need_update;
  37. decode_result_cells_ptr = result.decode_result_cells_ptr;
  38. decode_events_ptr = result.decode_events_ptr;
  39. decode_result_count = result.decode_result_count;
  40. decode_event_count = result.decode_event_count;
  41. }
  42. ~XXXDecodeResult() = default;
  43. XXXDecodeResult(XXXDecodeResult&& other) noexcept
  44. : decode_result_need_update(other.decode_result_need_update),
  45. decode_event_need_update(other.decode_event_need_update),
  46. decode_result_cells_ptr(other.decode_result_cells_ptr),
  47. decode_events_ptr(other.decode_events_ptr),
  48. decode_result_count(other.decode_result_count),
  49. decode_event_count(other.decode_event_count)
  50. {
  51. }
  52. XXXDecodeResult& operator=(const XXXDecodeResult& other)
  53. {
  54. if (this == &other) return *this;
  55. decode_result_need_update = other.decode_result_need_update;
  56. decode_event_need_update = other.decode_event_need_update;
  57. decode_result_cells_ptr = other.decode_result_cells_ptr;
  58. decode_events_ptr = other.decode_events_ptr;
  59. decode_result_count = other.decode_result_count;
  60. decode_event_count = other.decode_event_count;
  61. return *this;
  62. }
  63. XXXDecodeResult& operator=(XXXDecodeResult&& other) noexcept
  64. {
  65. if (this == &other) return *this;
  66. decode_result_need_update = other.decode_result_need_update;
  67. decode_event_need_update = other.decode_event_need_update;
  68. decode_result_cells_ptr = other.decode_result_cells_ptr;
  69. decode_events_ptr = other.decode_events_ptr;
  70. decode_result_count = other.decode_result_count;
  71. decode_event_count = other.decode_event_count;
  72. return *this;
  73. }
  74. };
  75. }