diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2005-02-08 08:33:44 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2005-02-08 08:33:44 +0000 |
commit | ab82f89dc8fde2725888b2577b6c44f113d3040f (patch) | |
tree | 8a9759f3be81fe4eba3a3d42e82609af907c60a4 /protocols/ace/RMCast/Stack.h | |
parent | 1b01c3c7544d1454ced15a8eae026f96758102a8 (diff) | |
download | ATCD-unlabeled-1.1.2.tar.gz |
ChangeLogTag:Tue Feb 8 00:22:48 2005 Ossama Othman <ossama@dre.vanderbilt.edu>unlabeled-1.1.2
Diffstat (limited to 'protocols/ace/RMCast/Stack.h')
-rw-r--r-- | protocols/ace/RMCast/Stack.h | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/protocols/ace/RMCast/Stack.h b/protocols/ace/RMCast/Stack.h new file mode 100644 index 00000000000..e371370977d --- /dev/null +++ b/protocols/ace/RMCast/Stack.h @@ -0,0 +1,87 @@ +// file : ace/RMCast/Stack.h +// author : Boris Kolpackov <boris@kolpackov.net> +// cvs-id : $Id$ + +#ifndef ACE_RMCAST_STACK_H +#define ACE_RMCAST_STACK_H + +#include <ace/RMCast/Protocol.h> + +namespace ACE_RMCast +{ + struct Out_Element + { + virtual + ~Out_Element () + { + } + + Out_Element () + : out_ (0) + { + } + + virtual void + out_start (Out_Element* out) + { + out_ = out; + } + + virtual void + send (Message_ptr m) + { + if (out_) out_->send (m); + } + + virtual void + out_stop () + { + out_ = 0; + } + + protected: + Out_Element* out_; + }; + + + struct In_Element + { + virtual + ~In_Element () + { + } + + In_Element () + : in_ (0) + { + } + + virtual void + in_start (In_Element* in) + { + in_ = in; + } + + virtual void + recv (Message_ptr m) + { + if (in_) in_->recv (m); + } + + virtual void + in_stop () + { + in_ = 0; + } + + protected: + In_Element* in_; + }; + + struct Element : In_Element, Out_Element + { + }; + +} + +#endif // ACE_RMCAST_STACK_H |