Inspector.hpp 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. * @Description: 检查处
  3. * @Version: 1.0
  4. * @Autor: lishengyin
  5. * @Date: 2022-04-02 14:16:08
  6. * @LastEditors: lishengyin
  7. * @LastEditTime: 2022-04-15 11:21:04
  8. */
  9. #ifndef __INSPECTOR_HPP_
  10. #define __INSPECTOR_HPP_
  11. #include <iostream>
  12. #include "ins_module.hpp"
  13. #include "Util/logger.h"
  14. #include "Util/NoticeCenter.h"
  15. using namespace std;
  16. namespace ins{
  17. class Inspector:public Module
  18. {
  19. private:
  20. Inspector():Module("Inspector"){
  21. Init();
  22. }
  23. public:
  24. using Ptr = std::shared_ptr<Inspector>;
  25. ~Inspector(){this->Destroy();}
  26. /**
  27. * @description: 获取ptr
  28. * @param {*}
  29. * @return {*}
  30. */
  31. static std::shared_ptr<Inspector> getPtr();
  32. /**
  33. * @description: 检查模块
  34. * @param {*}
  35. * @return {*}
  36. */
  37. int8_t CheckModule();
  38. /**
  39. * @description: 初始化
  40. * @param {*}
  41. * @return {*}
  42. */
  43. int8_t Init() override;
  44. /**
  45. * @description: 释放
  46. * @param {*}
  47. * @return {*}
  48. */
  49. void Destroy() override;
  50. /**
  51. * @description: 是否正常
  52. * @param {*}
  53. * @return {*}
  54. */
  55. bool isNormally() override{
  56. return true;
  57. }
  58. };
  59. };
  60. #endif