Gyoto
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
include
GyotoHooks.h
Go to the documentation of this file.
1
12
/*
13
Copyright 2012-2013 Thibaut Paumard
14
15
This file is part of Gyoto.
16
17
Gyoto is free software: you can redistribute it and/or modify
18
it under the terms of the GNU General Public License as published by
19
the Free Software Foundation, either version 3 of the License, or
20
(at your option) any later version.
21
22
Gyoto is distributed in the hope that it will be useful,
23
but WITHOUT ANY WARRANTY; without even the implied warranty of
24
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25
GNU General Public License for more details.
26
27
You should have received a copy of the GNU General Public License
28
along with Gyoto. If not, see <http://www.gnu.org/licenses/>.
29
*/
30
31
#ifndef __GyotoHooks_h
32
#define __GyotoHooks_h
33
44
namespace
Gyoto {
45
namespace
Hook {
52
class
Teller;
53
60
class
Listener;
61
};
62
};
63
64
class
Gyoto::Hook::Listener
{
65
friend
class
Gyoto::Hook::Teller
;
66
public
:
67
Listener
();
68
~Listener
();
69
70
protected
:
79
virtual
void
tell
(
Gyoto::Hook::Teller
*msg);
80
};
81
82
class
Gyoto::Hook::Teller
{
83
friend
class
Gyoto::Hook::Listener
;
84
private
:
89
class
ListenerItem
;
90
94
ListenerItem
*
listeners_
;
95
96
public
:
97
Teller
();
98
Teller
(
const
Teller
&);
99
~Teller
();
100
114
virtual
void
hook
(
Listener
* listener);
115
129
virtual
void
unhook
(
Listener
* listener);
130
131
protected
:
138
virtual
void
tellListeners
();
139
};
140
141
#endif
Generated on Tue Sep 3 2013 15:15:04 for Gyoto by
1.8.1.2