TestApp.hpp 846 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #ifndef __TESTAPP_HPP__
  2. #define __TESTAPP_HPP__
  3. #include <iostream>
  4. #include "Util/SqlPool.h"
  5. #include "UtilBase.hpp"
  6. #include "Util/logger.h"
  7. //#include "config.hpp"
  8. #include "HepuPlugin.hpp"
  9. using namespace std;
  10. using namespace toolkit;
  11. namespace gsd
  12. {
  13. class TestApp
  14. {
  15. private:
  16. TestApp(){
  17. InfoL<<"Test APP"<<endl;
  18. }
  19. public:
  20. using Ptr = std::shared_ptr<TestApp>;
  21. static std::shared_ptr<TestApp> CreateNew();
  22. virtual bool Init();
  23. virtual bool StartTask();
  24. virtual void Destroy();
  25. virtual bool Alive();
  26. ~TestApp(){
  27. this->Destroy();
  28. }
  29. protected:
  30. HepuPlugin::Ptr m_HepuPlugin = nullptr;
  31. Timer::Ptr timer0 = nullptr;
  32. };
  33. }
  34. #endif