ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/Spectre2/Daemon.hpp
Revision: 403
Committed: 2004-12-29T22:57:50-08:00 (20 years, 5 months ago) by douglas
File size: 532 byte(s)
Log Message:
Grr!

File Contents

# Content
1 // Spectre 2
2 //
3 // Douglas Thrift
4 //
5 // $Id$
6
7 #ifndef _Daemon_hpp_
8 #define _Daemon_hpp_
9
10 #include "Spectre2.hpp"
11
12 #ifndef MENES_PRAGMA_ONCE
13 #pragma once
14 #endif
15
16 #include <menes-api/threads.hpp>
17 #include <menes-etl/fnbind.hpp>
18
19 class Daemon
20 {
21 protected:
22 bool running, loaded;
23 virtual void load()/*=0*/;
24 virtual void run()/*=0*/;
25 Daemon();
26 private:
27 _H<api::Thread> thread;
28 int loop();
29 public:
30 virtual ~Daemon() { thread->Join(); }
31 void reload() { loaded = false; }
32 void stop() { running = false; }
33 };
34
35 #endif // _Daemon_hpp_

Properties

Name Value
svn:eol-style native
svn:keywords Id