Merge pull request #2216 from jwillemsen/jwi-cxxversionchecks
[ACE_TAO.git] / ACE / examples / APG / Streams / CommandTask.h
blobbc4579ba7936cec42fb1a8f515c4488301ca57a2
1 /* -*- C++ -*- */
2 #ifndef COMMAND_TASK_H
3 #define COMMAND_TASK_H
5 #include "ace/Task.h"
6 #include "ace/Module.h"
8 #include "Command.h"
10 // Listing 01 code/ch18
11 class CommandTask : public ACE_Task<ACE_MT_SYNCH>
13 public:
14 typedef ACE_Task<ACE_MT_SYNCH> inherited;
16 virtual ~CommandTask () { }
18 virtual int open (void * = 0 );
20 int put (ACE_Message_Block *message,
21 ACE_Time_Value *timeout);
23 virtual int svc ();
25 virtual int close (u_long flags);
27 protected:
28 CommandTask (int command);
30 virtual int process (Command *message);
32 int command_;
34 // Listing 01
37 #endif /* COMMAND_TASK_H */