00001 /***************************************************************************\ 00002 * Copyright (C) by University Paris-Est - MISS team 00003 * Inputcontroller.hpp created in 12 2008. 00004 * Mail : biri@univ-mlv.fr 00005 * 00006 * This file is part of the OpenKraken-controller. 00007 * 00008 * The OpenKraken-controller is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU Lesser General Public License as published by 00010 * the Free Software Foundation; either version 3 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * The OpenKraken-controller 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 Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public License 00019 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00020 * 00021 \***************************************************************************/ 00022 00023 #ifndef __OPENKN_CONTROLLER__INPUT_CONTROLLER_HPP__ 00024 #define __OPENKN_CONTROLLER__INPUT_CONTROLLER_HPP__ 00025 00026 00027 /* 00028 * Internal Includes 00029 */ 00030 #include "ControllerException.hpp" 00031 00032 /* 00033 * External Includes 00034 */ 00035 00036 /* 00037 * Namespace 00038 */ 00039 namespace kn{ 00040 00044 class InputController 00045 { 00046 00047 protected : 00048 bool updatedFlag; 00052 virtual void flagAsUpdated(void) {updatedFlag = true;} 00057 virtual void updateAsNotUpdated(void) {updatedFlag = false;} 00058 00059 public: 00060 00064 InputController(void){updatedFlag=false;} 00065 00069 virtual ~InputController(void){}; 00070 00071 public : 00076 virtual bool hasBeenUpdated(void) { return updatedFlag;} 00077 00078 /* 00079 * Traitement génnérique des évenements 00080 */ 00081 00082 public : 00088 virtual unsigned int popEvent(void)=0; 00089 00094 virtual unsigned int topEvent(void)=0; 00095 00100 virtual unsigned int popError(void)=0; 00101 00106 virtual unsigned int topError(void)=0; 00107 00108 00109 }; 00110 } 00111 00112 00113 #endif
1.5.8