StrategyStation.h 960 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #ifndef __MAS_STRATEGY_STATION_H
  2. #define __MAS_STRATEGY_STATION_H
  3. #include "StrategyLib.h"
  4. #include "MAS_Definition.h"
  5. #include "HTTP_Definition.h"
  6. #include "StreamDef.h"
  7. #include <mutex>
  8. NAMESPACE_MAS_BEGIN
  9. class StrategyStation {
  10. public:
  11. StrategyStation();
  12. ~StrategyStation();
  13. TZ_INT Initialize();
  14. TZ_INT Dispose();
  15. TZ_INT QueryStrategy(const QueryCondition & reqInfo,
  16. PageResult & info,std::list<StrategyInfo> & infos);
  17. TZ_INT EditStrategy(const StrategyInfo & info);
  18. SPtr<IStreamPipe> BuildPipe(
  19. TZ_INT sceneId, const std::string & sceneName,
  20. TZ_INT straId, const std::string & straParams);
  21. private:
  22. TZ_INT loadStraLibs();
  23. TZ_INT updateDbByStrategy(StrategyInfo & stra,
  24. const std::string & libpath);
  25. SPtr<StrategyLib> genStraLibIns(
  26. const std::string & libpath, StrategyInfo & stra);
  27. TZ_INT getDetIdByKey(const std::string & key);
  28. private:
  29. std::map<TZ_INT, SPtr<StrategyLib>> m_straLib;
  30. };
  31. NAMESPACE_MAS_END
  32. #endif