summaryrefslogtreecommitdiff
path: root/protocols/ace/RMCast/RMCast_Module.h
blob: 30f3da2f4fe42837793756f3196967b7a4322ae2 (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
/* -*- 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 put_data (ACE_RMCast::Data &data) = 0;
  // 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 */