6 #include <Poco/AtomicCounter.h>
7 #include <Poco/Event.h>
8 #include <Poco/RunnableAdapter.h>
9 #include <Poco/SharedPtr.h>
10 #include <Poco/Thread.h>
12 #include "io/Console.h"
13 #include "loop/StoppableLoop.h"
14 #include "loop/StopControl.h"
15 #include "util/Loggable.h"
47 typedef Poco::SharedPtr<Tool> Ptr;
49 Tool(
bool terminate =
true,
bool repeat =
false);
51 void setTerminate(
bool terminate);
52 void setRepeat(
bool repeat);
53 void setCommand(
const std::string &
command);
54 void setConsole(Console::Ptr console);
60 void start()
override;
80 const std::vector<std::string> &args) = 0;
100 void startSession(
const std::vector<std::string> &args);
115 std::string m_command;
116 Console::Ptr m_console;
118 Poco::RunnableAdapter<Tool> m_runner;
119 Poco::Thread m_thread;
Definition: StoppableLoop.h:17
StopControl implements the stop mechanism generically.
Definition: StopControl.h:12
Definition: Loggable.h:19