summaryrefslogtreecommitdiff
path: root/ace/RMCast/RMCast_Module.h
blob: 9f83c2d5be47df92e94ef620c0b4f4d8cb2f58b1 (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
74
75
76
77
78
79
80
81
82
/* -*- C++ -*- */
// $Id$

// ============================================================================
//
// = LIBRARY
//    ace
//
// = FILENAME
//    RMCast_Module.h
//
// = AUTHOR
//    Carlos O'Ryan <coryan@uci.edu>
//
// ============================================================================

#ifndef ACE_RMCAST_MODULE_H
#define ACE_RMCAST_MODULE_H
#include "ace/pre.h"

#include "RMCast.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

class ACE_Message_Block;
class ACE_Time_Value;

class ACE_RMCast_Export ACE_RMCast_Module
{
  // = TITLE
  //     Reliable Multicast Module
  //
  // = DESCRIPTION
  //     The reliable multicast protocol is implemented as a stack of
  //     "Modules" each one performing one specific task.
  //     In short, this is an instance of the pipes-and-filters
  //     architectural pattern.
  //
public:
  // = Initialization and termination methods.
  ACE_RMCast_Module (void);
  // Constructor

  virtual ~ACE_RMCast_Module (void);
  // Destructor

  virtual int next (ACE_RMCast_Module *next);
  virtual ACE_RMCast_Module* next (void) const;
  virtual int prev (ACE_RMCast_Module *prev);
  virtual ACE_RMCast_Module* prev (void) const;
  // Modifiers and accessors for the previous and next module in the
  // stack

  virtual int open (void);
  // Initialize the module, setting up the next module

  virtual int close (void);
  // Close the module.

  virtual int data (ACE_RMCast::Data &);
  virtual int poll (ACE_RMCast::Poll &);
  virtual int ack_join (ACE_RMCast::Ack_Join &);
  virtual int ack_leave (ACE_RMCast::Ack_Leave &);
  virtual int ack (ACE_RMCast::Ack &);
  virtual int join (ACE_RMCast::Join &);
  virtual int leave (ACE_RMCast::Leave &);
  // Push data down the stack

private:
  ACE_RMCast_Module *next_;
  ACE_RMCast_Module *prev_;
  // The next and previous modules in the stack
};

#if defined (__ACE_INLINE__)
#include "RMCast_Module.i"
#endif /* __ACE_INLINE__ */

#include "ace/post.h"
#endif /* ACE_RMCAST_MODULE_H */