Robot Simulator of the Robotics Group for Self-Organization of Control
0.8.0
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
mediatorcollegue.h
Go to the documentation of this file.
1
/***************************************************************************
2
* Copyright (C) 2005-2011 LpzRobots development team *
3
* Georg Martius <georg dot martius at web dot de> *
4
* Frank Guettler <guettler at informatik dot uni-leipzig dot de *
5
* Frank Hesse <frank at nld dot ds dot mpg dot de> *
6
* Ralf Der <ralfder at mis dot mpg dot de> *
7
* *
8
* This program is free software; you can redistribute it and/or modify *
9
* it under the terms of the GNU General Public License as published by *
10
* the Free Software Foundation; either version 2 of the License, or *
11
* (at your option) any later version. *
12
* *
13
* This program is distributed in the hope that it will be useful, *
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16
* GNU General Public License for more details. *
17
* *
18
* You should have received a copy of the GNU General Public License *
19
* along with this program; if not, write to the *
20
* Free Software Foundation, Inc., *
21
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
22
* *
23
***************************************************************************/
24
#ifndef __MEDIATORCOLLEGUE_H_
25
#define __MEDIATORCOLLEGUE_H_
26
27
//#include "mediator.h"
28
29
class
Mediator
;
30
class
MediatorEvent
;
31
32
class
MediatorCollegue
33
{
34
public
:
35
typedef
unsigned
long
InformMediatorType
;
36
37
static
const
InformMediatorType
DEFAULT_INFORM_MEDIATOR_TYPE
= 0;
38
39
MediatorCollegue
(
Mediator
* myMediator = 0);
40
virtual
~MediatorCollegue
();
41
42
/**
43
* Calls the mediator that this collegue has performed something.
44
* The event and the instance of this class is handed over.
45
*/
46
void
informMediator
(
MediatorEvent
* event);
47
48
/**
49
* Is called when the mediator informs this collegue that an event
50
* has to be performed by this collegue instance.
51
*/
52
virtual
void
doOnMediatorCallBack
(
MediatorEvent
* event) = 0;
53
54
protected
:
55
56
/**
57
* Sets the own mediator. Useful if mediator is unknown in initialization.
58
* @param myMediator
59
*/
60
void
setMediator
(
Mediator
* myMediator);
61
62
63
private
:
64
65
Mediator
* myMediator;
66
};
67
68
#endif
/* _MEDIATORCOLLEGUE_H_ */
MediatorCollegue::MediatorCollegue
MediatorCollegue(Mediator *myMediator=0)
Definition:
mediatorcollegue.cpp:28
MediatorCollegue::informMediator
void informMediator(MediatorEvent *event)
Calls the mediator that this collegue has performed something.
Definition:
mediatorcollegue.cpp:39
MediatorCollegue::doOnMediatorCallBack
virtual void doOnMediatorCallBack(MediatorEvent *event)=0
Is called when the mediator informs this collegue that an event has to be performed by this collegue ...
MediatorCollegue::DEFAULT_INFORM_MEDIATOR_TYPE
static const InformMediatorType DEFAULT_INFORM_MEDIATOR_TYPE
Definition:
mediatorcollegue.h:37
MediatorCollegue::InformMediatorType
unsigned long InformMediatorType
Definition:
mediatorcollegue.h:35
MediatorEvent
The default MediatorEvent holds no information, the implementation of the mediator should implement a...
Definition:
mediator.h:36
MediatorCollegue::setMediator
void setMediator(Mediator *myMediator)
Sets the own mediator.
Definition:
mediatorcollegue.cpp:46
MediatorCollegue::~MediatorCollegue
virtual ~MediatorCollegue()
Definition:
mediatorcollegue.cpp:34
Mediator
Definition:
mediator.h:41
MediatorCollegue
Definition:
mediatorcollegue.h:32
selforg
utils
mediatorcollegue.h
Generated on Mon Jan 12 2015 09:40:56 for Robot Simulator of the Robotics Group for Self-Organization of Control by
1.8.6