ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/Spectre2/Daemon.hpp
(Generate patch)

Comparing Spectre2/Daemon.hpp (file contents):
Revision 403 by douglas, 2004-12-29T22:57:50-08:00 vs.
Revision 406 by douglas, 2004-12-30T22:08:35-08:00

# Line 18 | Line 18
18  
19   class Daemon
20   {
21 protected:
22        bool running, loaded;
23        virtual void load()/*=0*/;
24        virtual void run()/*=0*/;
25        Daemon();
21   private:
22          _H<api::Thread> thread;
23          int loop();
24 + protected:
25 +        bool running, loaded;
26 +        virtual void load() = 0;
27 +        virtual void run() = 0;
28 +        Daemon() : running(false), loaded(false) {}
29   public:
30 <        virtual ~Daemon() { thread->Join(); }
30 >        virtual ~Daemon() { if (!thread.IsEmpty()) thread->Join(); }
31 >        void start();
32          void reload() { loaded = false; }
33          void stop() { running = false; }
34   };

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines