]> git.lyx.org Git - features.git/commitdiff
Remove cruft left over from the removal of the Forks dialog.
authorAngus Leeming <leeming@lyx.org>
Mon, 22 Mar 2004 14:10:20 +0000 (14:10 +0000)
committerAngus Leeming <leeming@lyx.org>
Mon, 22 Mar 2004 14:10:20 +0000 (14:10 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8511 a592a061-630c-0410-9148-cb99ea01b6c8

src/support/ChangeLog
src/support/forkedcontr.C
src/support/forkedcontr.h

index 5a25694d3e93088ed5b5b76ad0da2569fc718481..d5f2c1d15576b259d46711cb0eac8cd097387d18 100644 (file)
@@ -1,3 +1,8 @@
+2004-03-22  Angus Leeming  <leeming@lyx.org>
+
+       * forkedcontr.[Ch] (childrenChanged, getPIDs, getCommand): remove
+       cruft left over from the removal of the Forks dialog.
+
 2004-03-09  Georg Baum  <Georg.Baum@post.rwth-aachen.de>
 
        * filename.[Ch] (mangledFilename): make sure that mangled names are
index 3795ec1925950e259d5b79ace5e53409bef17141..5124453e21254c3bb2c994ea5d5d6da2d99fdcc0 100644 (file)
@@ -34,7 +34,6 @@ using boost::bind;
 using std::endl;
 using std::find_if;
 using std::string;
-using std::vector;
 
 #ifndef CXX_GLOBAL_CSTD
 using std::strerror;
@@ -81,7 +80,6 @@ void ForkedcallsController::addCall(ForkedProcess const & newcall)
                timeout_->start();
 
        forkedCalls.push_back(newcall.clone().release());
-       childrenChanged();
 }
 
 
@@ -89,8 +87,6 @@ void ForkedcallsController::addCall(ForkedProcess const & newcall)
 // Check the list and, if there is a stopped child, emit the signal.
 void ForkedcallsController::timer()
 {
-       ListType::size_type start_size = forkedCalls.size();
-
        ListType::iterator it  = forkedCalls.begin();
        ListType::iterator end = forkedCalls.end();
        while (it != end) {
@@ -155,44 +151,6 @@ void ForkedcallsController::timer()
        if (!forkedCalls.empty() && !timeout_->running()) {
                timeout_->start();
        }
-
-       if (start_size != forkedCalls.size())
-               childrenChanged();
-}
-
-
-// Return a vector of the pids of all the controlled processes.
-vector<pid_t> const ForkedcallsController::getPIDs() const
-{
-       vector<pid_t> pids;
-
-       if (forkedCalls.empty())
-               return pids;
-
-       pids.resize(forkedCalls.size());
-
-       vector<pid_t>::iterator vit = pids.begin();
-       for (ListType::const_iterator lit = forkedCalls.begin();
-            lit != forkedCalls.end(); ++lit, ++vit) {
-               *vit = (*lit)->pid();
-       }
-
-       std::sort(pids.begin(), pids.end());
-       return pids;
-}
-
-
-// Get the command string of the process.
-string const ForkedcallsController::getCommand(pid_t pid) const
-{
-       ListType::const_iterator it =
-               find_if(forkedCalls.begin(), forkedCalls.end(),
-                       lyx::compare_memfun(&Forkedcall::pid, pid));
-
-       if (it == forkedCalls.end())
-               return string();
-
-       return (*it)->command();
 }
 
 
index 58b7e33e164bcf80b643faa010ca4570783294a8..ca02d23b02b87cc60cd043eca2071511fdd54b91 100644 (file)
 #ifndef FORKEDCONTR_H
 #define FORKEDCONTR_H
 
-#include <boost/signals/signal0.hpp>
-#include <boost/signals/trackable.hpp>
-
 #include <sys/types.h> // needed for pid_t
 
 #include <list>
-#include <vector>
 
 class Timeout;
 
@@ -31,46 +27,31 @@ namespace support {
 
 class ForkedProcess;
 
-class ForkedcallsController : public boost::signals::trackable {
+class ForkedcallsController {
 public:
-       /// We need this to avoid warnings.
-       ForkedcallsController();
-       /** This d-tor should really be private, but making it public
-        *   allows egcs 1.1 to compile the class.
-        */
-       ~ForkedcallsController();
-
        /// Get hold of the only controller that can exist inside the process.
        static ForkedcallsController & get();
 
        /// Add a new child process to the list of controlled processes.
        void addCall(ForkedProcess const &);
 
-       /** This method is connected to the timer. Every XX ms it is called
-        *  so that we can check on the status of the children. Those that
-        *  are found to have finished are removed from the list and their
-        *  callback function is passed the final return state.
-        */
-       void timer();
-
-       /// Return a vector of the pids of all the controlled processes.
-       std::vector<pid_t> const getPIDs() const;
-
-       /// Get the command string of the process.
-       std::string const getCommand(pid_t) const;
-
        /** Kill this process prematurely and remove it from the list.
         *  The process is killed within tolerance secs.
         *  See forkedcall.[Ch] for details.
         */
        void kill(pid_t, int tolerance = 5);
 
-       /// Signal emitted when the list of current child processes changes.
-       boost::signal0<void> childrenChanged;
-
 private:
-       ///
+       ForkedcallsController();
        ForkedcallsController(ForkedcallsController const &);
+       ~ForkedcallsController();
+
+       /** This method is connected to the timer. Every XX ms it is called
+        *  so that we can check on the status of the children. Those that
+        *  are found to have finished are removed from the list and their
+        *  callback function is passed the final return state.
+        */
+       void timer();
 
        /// The child processes
        typedef std::list<ForkedProcess *> ListType;