13 #ifndef mitkProcessExecutor_h
14 #define mitkProcessExecutor_h
17 #include <itkObject.h>
19 #include <itksys/Process.h>
34 const char *
GetEventName()
const override {
return "ExternalProcessOutputEvent"; }
35 bool CheckEvent(const ::itk::EventObject *e)
const override {
return dynamic_cast<const Self *
>(e); }
43 #define mitkProcessExecutorEventMacro(classname) \
44 class classname : public ExternalProcessOutputEvent \
47 typedef classname Self; \
48 typedef ExternalProcessOutputEvent Superclass; \
50 explicit classname(const std::string &output) : Superclass(output) {} \
51 ~classname() override {} \
53 virtual const char *GetEventName() const override { return #classname; } \
54 virtual bool CheckEvent(const ::itk::EventObject *e) const override { return dynamic_cast<const Self *>(e); } \
55 virtual ::itk::EventObject *MakeObject() const override { return new Self(this->GetOutput()); } \
76 itkFactorylessNewMacro(
Self);
78 itkSetMacro(SharedOutputPipes,
bool);
79 itkGetConstMacro(SharedOutputPipes,
bool);
83 bool Execute(
const std::string &executionPath,
const std::string &executableName,
ArgumentListType &argumentList);
89 virtual bool Execute(
const std::string &executionPath,
const ArgumentListType &argumentList);
92 static std::string EnsureCorrectOSPathSeparator(
const std::string &);
94 static std::string GetOSDependendExecutableName(
const std::string &name);
112 itksysProcess *m_ProcessID =
nullptr;