AtomicTool.h 875 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #pragma once
  2. #include <Atomic/Engine/Application.h>
  3. using namespace Atomic;
  4. #include <ToolCore/Command/Command.h>
  5. using namespace ToolCore;
  6. namespace AtomicTool
  7. {
  8. class AtomicTool : public Application
  9. {
  10. OBJECT(AtomicTool);
  11. public:
  12. AtomicTool(Context* context);
  13. virtual ~AtomicTool();
  14. /// Setup before engine initialization. Verify that a script file has been specified.
  15. virtual void Setup();
  16. /// Setup after engine initialization. Load the script and execute its start function.
  17. virtual void Start();
  18. /// Cleanup after the main loop. Run the script's stop function if it exists.
  19. virtual void Stop();
  20. private:
  21. void HandleCommandFinished(StringHash eventType, VariantMap& eventData);
  22. void HandleCommandError(StringHash eventType, VariantMap& eventData);
  23. String cliDataPath_;
  24. SharedPtr<Command> command_;
  25. };
  26. }