Robot Simulator of the Robotics Group for Self-Organization of Control  0.8.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
callbackable.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 _CALLBACKABLE_H
25 #define _CALLBACKABLE_H
26 
27 #include "backcaller.h"
28 
29 /**
30  * Interface class for a class which wants to be callback on a certain action.
31  * In lpzRobots this should be the most case when the time loop is going to the
32  * next step.
33  *
34  * NEW since 20090731:
35  * Use the class BackCaller to get already implemented functions like addCallbackable(...).
36  *
37  * @see BackCaller
38  */
40 {
41  public:
42 
44 
45  virtual ~Callbackable() {}
46 
47  /**
48  * This method is invoked when a callback is done from the class where this
49  * class is for callback registered
50  * @param source the caller instance which did the callback.
51  * @param type this type can be used to differ from varying types of callback.
52  * @see BackCaller
53  */
55 
56 
57 };
58 
59 #endif
Interface class for a class which wants to be callback on a certain action.
Definition: callbackable.h:39
Callbackable()
Definition: callbackable.h:43
static const CallbackableType DEFAULT_CALLBACKABLE_TYPE
This is the default Callbackable type.
Definition: backcaller.h:51
unsigned long CallbackableType
Definition: backcaller.h:45
virtual ~Callbackable()
Definition: callbackable.h:45
virtual void doOnCallBack(BackCaller *source, BackCaller::CallbackableType type=BackCaller::DEFAULT_CALLBACKABLE_TYPE)=0
This method is invoked when a callback is done from the class where this class is for callback regist...
Class prototype which provides functions to handle callbackable classes.
Definition: backcaller.h:42