summaryrefslogtreecommitdiff
path: root/trunk/ACE/examples/APG/Timers/PCB.h
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/ACE/examples/APG/Timers/PCB.h')
-rw-r--r--trunk/ACE/examples/APG/Timers/PCB.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/trunk/ACE/examples/APG/Timers/PCB.h b/trunk/ACE/examples/APG/Timers/PCB.h
new file mode 100644
index 00000000000..7fdb9d2d1cf
--- /dev/null
+++ b/trunk/ACE/examples/APG/Timers/PCB.h
@@ -0,0 +1,29 @@
+/* -*- C++ -*- */
+// $Id$
+
+#if !defined(PCB_H)
+#define PCB_H
+
+// Listing 1 code/ch20
+class PCB
+{
+public:
+ PCB ();
+ virtual ~PCB ();
+
+ // Set/get the timer id that is being handled by this instance.
+ void setID (long timerID);
+ long getID (void) const;
+
+ // Handle a timeout event, cancel, and close.
+ virtual int handleEvent (const void *arg);
+ virtual int handleCancel (void);
+ virtual int handleClose (void);
+
+private:
+ long timerID_;
+ int count_;
+};
+// Listing 1
+
+#endif /*PCB_H*/