UtiLite  0.3.1
A lite utilities library
include/utilite/UEvent.h
00001 /*
00002 *  utilite is a cross-platform library with
00003 *  useful utilities for fast and small developing.
00004 *  Copyright (C) 2010  Mathieu Labbe
00005 *
00006 *  utilite is free library: you can redistribute it and/or modify
00007 *  it under the terms of the GNU Lesser General Public License as published by
00008 *  the Free Software Foundation, either version 3 of the License, or
00009 *  (at your option) any later version.
00010 *
00011 *  utilite is distributed in the hope that it will be useful,
00012 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 *  GNU Lesser General Public License for more details.
00015 *
00016 *  You should have received a copy of the GNU Lesser General Public License
00017 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
00018 */
00019 
00020 #ifndef UEVENT_H
00021 #define UEVENT_H
00022 
00023 #include "utilite/UtiLiteExp.h" // DLL export/import defines
00024 
00025 #include <string>
00026 
00027 class UEventsHandler;
00028 
00057 class UTILITE_EXP UEvent{
00058 public:
00059     virtual ~UEvent() {}
00060 
00068     virtual std::string getClassName() const = 0; // TODO : macro?
00069 
00074     int getCode() const {return code_;}
00075 
00076 protected:
00081         UEvent(int code = 0) : code_(code) {}
00082 
00083 private:
00084     int code_; 
00085 };
00086 
00087 #endif // UEVENT_H
 All Classes Files Functions Variables Enumerations Friends Defines