1
#if !defined(__MEDIATOR_HPP)
6
Copyright (C) 2000 CoreLinux Consortium
8
The CoreLinux++ Library is free software; you can redistribute it and/or
9
modify it under the terms of the GNU Library General Public License as
10
published by the Free Software Foundation; either version 2 of the
11
License, or (at your option) any later version.
13
The CoreLinux++ Library Library is distributed in the hope that it will
14
be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
Library General Public License for more details.
18
You should have received a copy of the GNU Library General Public
19
License along with the GNU C Library; see the file COPYING.LIB. If not,
20
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21
Boston, MA 02111-1307, USA.
24
#if !defined(__COMMON_HPP)
28
#if !defined(__ITERATOR_HPP)
29
#include <Iterator.hpp>
32
#if !defined(__EVENT_HPP)
38
DECLARE_CLASS( Colleague );
39
DECLARE_CLASS( Mediator );
42
Mediator declares an interface for communicating with Colleague objects.
50
// Constructors and destructor
53
/// Default constructor
59
Mediator( MediatorCref );
61
/// Virtual destructor
63
virtual ~Mediator( void );
69
/// Assignment operator
71
MediatorRef operator=( MediatorCref );
75
bool operator==( MediatorCref ) const;
81
virtual void action( Event<Identifier>* )
82
throw ( NullPointerException );
91
colleagueCreated requires a implementation for
92
derivations that need to gather information
93
from the Colleague to distribute action events
94
@param Colleague pointer
97
virtual void colleagueCreated( ColleaguePtr ) = 0;
104
When action is called on the Mediator, it
105
will ask the implementation for the Colleagues
106
that are interested in the event identified by
108
@param IdentifierCref key to interested parties
109
@return Iterator over Colleague pointer
112
virtual Iterator<ColleaguePtr> *createIterator( Event<Identifier>* ) = 0;
115
Called when action is through with the colleague iteration
116
@param Iterator over Colleague pointer
119
virtual void destroyIterator( Iterator<ColleaguePtr> * ) = 0;
126
#endif // if !defined(__MEDIATOR_HPP)
129
Common rcs information do not modify
132
$Date: 2000/05/07 03:41:47 $