00001 /*************************************************************************** 00002 * Copyright (C) 2005 by Robot Group Leipzig * 00003 * martius@informatik.uni-leipzig.de * 00004 * fhesse@informatik.uni-leipzig.de * 00005 * der@informatik.uni-leipzig.de * 00006 * frankguettler@gmx.de * 00007 * * 00008 * This program is free software; you can redistribute it and/or modify * 00009 * it under the terms of the GNU General Public License as published by * 00010 * the Free Software Foundation; either version 2 of the License, or * 00011 * (at your option) any later version. * 00012 * * 00013 * This program is distributed in the hope that it will be useful, * 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00016 * GNU General Public License for more details. * 00017 * * 00018 * You should have received a copy of the GNU General Public License * 00019 * along with this program; if not, write to the * 00020 * Free Software Foundation, Inc., * 00021 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 00022 *************************************************************************** 00023 * * 00024 * DESCRIPTION * 00025 * * 00026 * $Log: callbackable.h,v $ 00027 * Revision 1.1 2007/05/07 21:04:44 robot3 00028 * added interface class, which provides the possibility, that an implementing class 00029 * can have a callback from another class where the implementing class is registered 00030 * for the callback. 00031 * 00032 * * 00033 ***************************************************************************/ 00034 #ifndef _CALLBACKABLE_H 00035 #define _CALLBACKABLE_H 00036 00037 /** 00038 * Interface class for a class which wants to be callback on a certain action. 00039 * In lpzrobots this should be the most case when the time loop is going to the 00040 * next step. 00041 * 00042 * Some classes are implementing the method addCallbackable(Callbackable* classname), 00043 * which should be called for getting a callback. 00044 */ 00045 class Callbackable { 00046 00047 public: 00048 00049 virtual ~Callbackable() {} 00050 00051 /** 00052 * this method is invoked when a callback is done from the class where this 00053 * class is for callback registered 00054 */ 00055 virtual void doOnCallBack() = 0; 00056 00057 }; 00058 00059 #endif