Sophie

Sophie

distrib > Mandriva > 10.0 > i586 > media > contrib > by-pkgid > 21280410b6ea906d791d7a12afae2579 > files > 624

libace5-doc-5.4-2mdk.i586.rpm

/* -*- C++ -*- */
// CommandTask.h,v 1.1 2004/01/01 21:01:00 shuston Exp

#ifndef COMMAND_TASK_H
#define COMMAND_TASK_H

#include "ace/Task.h"
#include "ace/Module.h"

#include "Command.h"

// Listing 01 code/ch18
class CommandTask : public ACE_Task<ACE_MT_SYNCH>
{
public:
  typedef ACE_Task<ACE_MT_SYNCH> inherited;

  virtual ~CommandTask () { }

  virtual int open (void * = 0 );

  int put (ACE_Message_Block *message,
           ACE_Time_Value *timeout);

  virtual int svc (void);

  virtual int close (u_long flags);

protected:
  CommandTask (int command);

  virtual int process (Command *message);

  int command_;
};
// Listing 01


#endif /* COMMAND_TASK_H */