]> git.lyx.org Git - lyx.git/blobdiff - src/support/ForkedCalls.h
Merge branch 'master' into biblatex2
[lyx.git] / src / support / ForkedCalls.h
index 529f5c6861082a56b763108818d028939626d0b0..1ed2f75ad5b8dfc5991a2fcad7cb3495b49368dd 100644 (file)
 #ifndef FORKEDCALLS_H
 #define FORKEDCALLS_H
 
-#include "support/shared_ptr.h"
 #include "support/strfwd.h"
-#include <boost/signal.hpp>
+#include <boost/signals2.hpp>
 
 #ifdef HAVE_SYS_TYPES_H
 # include <sys/types.h>
 #endif
 
+#include <memory>
+
+
 namespace lyx {
 namespace support {
 
@@ -40,7 +42,7 @@ public:
        ///
        virtual ~ForkedProcess() {}
        ///
-       virtual shared_ptr<ForkedProcess> clone() const = 0;
+       virtual std::shared_ptr<ForkedProcess> clone() const = 0;
 
        /** A SignalType signal can be emitted once the forked process
         *  has finished. It passes:
@@ -51,7 +53,7 @@ public:
         *  we can return easily to C++ methods, rather than just globally
         *  accessible functions.
         */
-       typedef boost::signal<void(pid_t, int)> SignalType;
+       typedef boost::signals2::signal<void(pid_t, int)> 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
@@ -61,7 +63,7 @@ public:
         *
         *  It doesn't matter if the slot disappears, SigC takes care of that.
         */
-       typedef shared_ptr<SignalType> SignalTypePtr;
+       typedef std::shared_ptr<SignalType> SignalTypePtr;
 
        /** Invoking the following methods makes sense only if the command
         *  is running asynchronously!
@@ -150,15 +152,17 @@ private:
 class ForkedCall : public ForkedProcess {
 public:
        ///
-       ForkedCall(std::string const & path = empty_string());
+       ForkedCall(std::string const & path = empty_string(),
+                  std::string const & lpath = empty_string());
        ///
-       virtual shared_ptr<ForkedProcess> clone() const {
-               return shared_ptr<ForkedProcess>(new ForkedCall(*this));
+       virtual std::shared_ptr<ForkedProcess> clone() const {
+               return std::make_shared<ForkedCall>(*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