X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fsupport%2FForkedCalls.h;h=1ed2f75ad5b8dfc5991a2fcad7cb3495b49368dd;hb=ecbd047cffa1c4af95cf4ab91a7d2fded4a5584c;hp=caeba526e0eaf9a9afe703635fbc12ae651f9259;hpb=c9b9748cee687e709e9e48dd2c78e054d8ea29a3;p=lyx.git diff --git a/src/support/ForkedCalls.h b/src/support/ForkedCalls.h index caeba526e0..1ed2f75ad5 100644 --- a/src/support/ForkedCalls.h +++ b/src/support/ForkedCalls.h @@ -14,14 +14,15 @@ #ifndef FORKEDCALLS_H #define FORKEDCALLS_H -#include "support/shared_ptr.h" -#include +#include "support/strfwd.h" +#include #ifdef HAVE_SYS_TYPES_H # include #endif -#include +#include + namespace lyx { namespace support { @@ -41,7 +42,7 @@ public: /// virtual ~ForkedProcess() {} /// - virtual shared_ptr clone() const = 0; + virtual std::shared_ptr clone() const = 0; /** A SignalType signal can be emitted once the forked process * has finished. It passes: @@ -52,7 +53,7 @@ public: * we can return easily to C++ methods, rather than just globally * accessible functions. */ - typedef boost::signal SignalType; + typedef boost::signals2::signal SignalType; /** The signal is connected in the calling routine to the desired * slot. We pass a shared_ptr rather than a reference to the signal @@ -62,7 +63,7 @@ public: * * It doesn't matter if the slot disappears, SigC takes care of that. */ - typedef shared_ptr SignalTypePtr; + typedef std::shared_ptr SignalTypePtr; /** Invoking the following methods makes sense only if the command * is running asynchronously! @@ -151,13 +152,17 @@ private: class ForkedCall : public ForkedProcess { public: /// - virtual shared_ptr clone() const { - return shared_ptr(new ForkedCall(*this)); + ForkedCall(std::string const & path = empty_string(), + std::string const & lpath = empty_string()); + /// + virtual std::shared_ptr clone() const { + return std::make_shared(*this); } /** Start the child process. * - * The command "what" is passed to execvp() for execution. + * The command "what" is passed to execvp() for execution. "$$s" is + * replaced accordingly by commandPrep(). * * There are two startScript commands available. They differ in that * the second receives a signal that is executed on completion of @@ -175,6 +180,8 @@ public: private: /// virtual int generateChild(); + /// + std::string cmd_prefix_; };