summaryrefslogtreecommitdiff
path: root/protocols/ace/RMCast/Stack.cpp
blob: aa62558b4c99ee9f5fd2226a64cf8e97bf294cde (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
// file      : ace/RMCast/Stack.cpp
// author    : Boris Kolpackov <boris@kolpackov.net>
// cvs-id    : $Id$

#include "Stack.h"

namespace ACE_RMCast
{
  // Out_Element
  //

  Out_Element::
  ~Out_Element ()
  {
  }

  Out_Element::
  Out_Element ()
      : out_ (0)
  {
  }

  void Out_Element::
  out_start (Out_Element* out)
  {
    out_ = out;
  }

  void Out_Element::
  send (Message_ptr m)
  {
    if (out_) out_->send (m);
  }

  void Out_Element::
  out_stop ()
  {
    out_ = 0;
  }


  // In_Element
  //

  In_Element::
  ~In_Element ()
  {
  }

  In_Element::
  In_Element ()
      : in_ (0)
  {
  }

  void In_Element::
  in_start (In_Element* in)
  {
    in_ = in;
  }

  void In_Element::
  recv (Message_ptr m)
  {
    if (in_) in_->recv (m);
  }

  void In_Element::
  in_stop ()
  {
    in_ = 0;
  }
}