X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fsupport%2FForkedCalls.h;h=1ed2f75ad5b8dfc5991a2fcad7cb3495b49368dd;hb=ecbd047cffa1c4af95cf4ab91a7d2fded4a5584c;hp=c45211f7a2427adad2046eba78a7dfa0ee2e7547;hpb=fca8ba713f0379a2b744ea9926e5d4fe7e5e90cf;p=lyx.git diff --git a/src/support/ForkedCalls.h b/src/support/ForkedCalls.h index c45211f7a2..1ed2f75ad5 100644 --- a/src/support/ForkedCalls.h +++ b/src/support/ForkedCalls.h @@ -14,14 +14,15 @@ #ifndef FORKEDCALLS_H #define FORKEDCALLS_H -#include -#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 boost::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 boost::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 boost::shared_ptr clone() const { - return boost::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_; };