]> git.lyx.org Git - lyx.git/blobdiff - src/support/ForkedCalls.h
Merge branch 'master' into biblatex2
[lyx.git] / src / support / ForkedCalls.h
index c45211f7a2427adad2046eba78a7dfa0ee2e7547..1ed2f75ad5b8dfc5991a2fcad7cb3495b49368dd 100644 (file)
 #ifndef FORKEDCALLS_H
 #define FORKEDCALLS_H
 
-#include <boost/shared_ptr.hpp>
-#include <boost/signal.hpp>
+#include "support/strfwd.h"
+#include <boost/signals2.hpp>
 
 #ifdef HAVE_SYS_TYPES_H
 # include <sys/types.h>
 #endif
 
-#include <string>
+#include <memory>
+
 
 namespace lyx {
 namespace support {
@@ -41,7 +42,7 @@ public:
        ///
        virtual ~ForkedProcess() {}
        ///
-       virtual boost::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:
@@ -52,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
@@ -62,7 +63,7 @@ public:
         *
         *  It doesn't matter if the slot disappears, SigC takes care of that.
         */
-       typedef boost::shared_ptr<SignalType> SignalTypePtr;
+       typedef std::shared_ptr<SignalType> 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<ForkedProcess> clone() const {
-               return boost::shared_ptr<ForkedProcess>(new ForkedCall(*this));
+       ForkedCall(std::string const & path = empty_string(),
+                  std::string const & lpath = empty_string());
+       ///
+       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
@@ -175,6 +180,8 @@ public:
 private:
        ///
        virtual int generateChild();
+       ///
+       std::string cmd_prefix_;
 };