orca-robotics INTRODUCTION Overview Download and Install Documentation REPOSITORY Interfaces Drivers Libraries Utilities Software Map DEVELOPER Dashboard PEOPLE Contributors Users Project Download Mailing lists
|
event.h00001 /* 00002 * Orca-Robotics Project: Components for robotics 00003 * http://orca-robotics.sf.net/ 00004 * Copyright (c) 2004-2008 Alex Brooks, Alexei Makarenko, Tobias Kaupp 00005 * 00006 * This distribution is licensed to you under the terms described in 00007 * the LICENSE file included in this distribution. 00008 * 00009 */ 00010 00011 #ifndef HYDROICEUTIL_EVENT_H 00012 #define HYDROICEUTIL_EVENT_H 00013 00014 #include <IceUtil/Handle.h> 00015 #include <IceUtil/Shared.h> 00016 00017 namespace hydroiceutil 00018 { 00019 00023 class Event : public IceUtil::Shared 00024 { 00025 public: 00027 Event( int type ) : type_(type) {}; 00028 00030 int type() const { return type_; }; 00031 00032 private: 00033 int type_; 00034 }; 00036 typedef IceUtil::Handle<Event> EventPtr; 00037 00038 00044 class EventReceiver 00045 { 00046 public: 00047 virtual ~EventReceiver() {}; 00048 00051 virtual bool event( const EventPtr& e )=0; 00052 00054 bool event( int type ) { return event( new hydroiceutil::Event(type) ); }; 00055 }; 00056 00057 } // namespace 00058 00059 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)