Mercurial > hg > orthanc
diff OrthancServer/Scheduler/ServerCommandInstance.h @ 1009:26642cecd36d lua-scripting
clearer job interface
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 09 Jul 2014 16:11:44 +0200 |
parents | 13e230bbd882 |
children | 6e7e5ed91c2d |
line wrap: on
line diff
--- a/OrthancServer/Scheduler/ServerCommandInstance.h Tue Jul 08 18:14:24 2014 +0200 +++ b/OrthancServer/Scheduler/ServerCommandInstance.h Wed Jul 09 16:11:44 2014 +0200 @@ -57,16 +57,17 @@ private: typedef IServerCommand::ListOfStrings ListOfStrings; - IServerCommand *filter_; + IServerCommand *command_; std::string jobId_; ListOfStrings inputs_; std::list<ServerCommandInstance*> next_; + bool connectedToSink_; bool Execute(IListener& listener); public: - ServerCommandInstance(IServerCommand *filter, - const std::string& jobId); + ServerCommandInstance(IServerCommand *command, + const std::string& jobId); virtual ~ServerCommandInstance(); @@ -80,19 +81,24 @@ inputs_.push_back(input); } - void ConnectNext(ServerCommandInstance& filter) + void ConnectOutput(ServerCommandInstance& next) + { + next_.push_back(&next); + } + + void SetConnectedToSink(bool connected = true) { - next_.push_back(&filter); + connectedToSink_ = connected; + } + + bool IsConnectedToSink() const + { + return connectedToSink_; } const std::list<ServerCommandInstance*>& GetNextCommands() const { return next_; } - - IServerCommand& GetCommand() const - { - return *filter_; - } }; }