AESubprocessSystem.h 997 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // Copyright (c) 2014-2015, THUNDERBEAST GAMES LLC All rights reserved
  2. // Please see LICENSE.md in repository root for license information
  3. // https://github.com/AtomicGameEngine/AtomicGameEngine
  4. #pragma once
  5. #include <Atomic/Core/Object.h>
  6. #include "AESubprocess.h"
  7. using namespace Atomic;
  8. namespace AtomicEditor
  9. {
  10. class SubprocessSystem : public Object
  11. {
  12. OBJECT(SubprocessSystem);
  13. public:
  14. /// Construct.
  15. SubprocessSystem(Context* context);
  16. /// Destruct.
  17. virtual ~SubprocessSystem();
  18. Subprocess* Launch(const String& command, const Vector<String>& args, const String& initialDirectory = "");
  19. Subprocess* Launch(const String& command, const Vector<String>& args, const String& initialDirectory, const Poco::Process::Env& env);
  20. private:
  21. void HandleUpdate(StringHash eventType, VariantMap& eventData);
  22. void HandleEditorShutdown(StringHash eventType, VariantMap& eventData);
  23. Vector<SharedPtr<Subprocess> > processes_;
  24. float updateTimer_;
  25. };
  26. }