diff options
author | Steve Huston <shuston@riverace.com> | 2004-01-01 21:01:01 +0000 |
---|---|---|
committer | Steve Huston <shuston@riverace.com> | 2004-01-01 21:01:01 +0000 |
commit | 6649a1a542c18bd756757a2d58f3ea51eea0cc47 (patch) | |
tree | 15b88279a4187c88c37adabba8740a0165139299 /examples/APG/Streams/CommandStream.h | |
parent | fcf24b2de58a080db0617c641f337298614a944b (diff) | |
download | ATCD-6649a1a542c18bd756757a2d58f3ea51eea0cc47.tar.gz |
ChangeLogTag:Thu Jan 1 15:20:30 2004 Steve Huston <shuston@riverace.com>
Diffstat (limited to 'examples/APG/Streams/CommandStream.h')
-rw-r--r-- | examples/APG/Streams/CommandStream.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/examples/APG/Streams/CommandStream.h b/examples/APG/Streams/CommandStream.h new file mode 100644 index 00000000000..a8406436a76 --- /dev/null +++ b/examples/APG/Streams/CommandStream.h @@ -0,0 +1,34 @@ +/* -*- C++ -*- */ +// $Id$ + +#ifndef COMMAND_STREAM_H +#define COMMAND_STREAM_H + +#include "ace/Module.h" +#include "ace/Stream.h" +#include "ace/SOCK_Stream.h" + +#include "Command.h" +#include "CommandTasks.h" + +// A CommandStream is a bidirectional ACE_Stream implementing a chain +// of commands. A message will move down the stream until a +// CommandModule is capable of processing it. After processing, it +// will move on down the stream to the end. Data received from the +// tail will likewise move up the stream until the downstream's +// partner module is encoutered. The retrieved data will be processed +// and continue on up the stream. + +// Listing 01 code/ch18 +class CommandStream : public ACE_Stream<ACE_MT_SYNCH> +{ +public: + typedef ACE_Stream<ACE_MT_SYNCH> inherited; + + CommandStream () : inherited() { } + int open (ACE_SOCK_Stream *peer); + Command *execute (Command *command); +}; +// Listing 01 + +#endif /* COMMAND_STREAM_H */ |