00001 /* 00002 * This file is part of openMask © INRIA, CNRS, Universite de Rennes 1 1993-2002, thereinafter the Software 00003 * 00004 * The Software has been developped within the Siames Project. 00005 * INRIA, the University of Rennes 1 and CNRS jointly hold intellectual property rights 00006 * 00007 * The Software has been registered with the Agence pour la Protection des 00008 * Programmes (APP) under registration number IDDN.FR.001.510008.00.S.P.2001.000.41200 00009 * 00010 * This file may be distributed under the terms of the Q Public License 00011 * version 1.0 as defined by Trolltech AS of Norway and appearing in the file 00012 * LICENSE.QPL included in the packaging of this file. 00013 * 00014 * Licensees holding valid specific licenses issued by INRIA, CNRS or Université de Rennes 1 00015 * for the software may use this file in accordance with that specific license 00016 * 00017 */ 00018 #ifndef OMKEVENTCREATORHEADER 00019 #define OMKEVENTCREATORHEADER 00020 00021 #include "OMKName.h" 00022 00023 #include <map> 00024 namespace OMK 00025 { 00026 class Event ; 00027 class EventIdentifier ; 00028 00033 class OMK_API EventCreator 00034 { 00035 public: 00036 virtual ~EventCreator() ; 00037 EventCreator (const Name & ) ; 00038 static Event * createEvent (const Name & classToCreate, const EventIdentifier & eventId, const Date & date, const Name & sender, const Name & receiver ) ; 00039 00041 virtual bool touch() 00042 { 00043 return true ; 00044 } 00045 00047 virtual void touch(bool ) 00048 { 00049 } 00050 00053 static void declareAlias ( const Name &, const Name & ) ; 00054 protected: 00055 Name _typeICanCreate ; 00056 00057 virtual Event * createRealEvent (const EventIdentifier & eventId, const Date & date, const Name & sender, const Name & receiver ) ; 00058 00059 #ifdef _MSC_VER 00060 typedef stdext::hash_map<Name, EventCreator *, Name::hash_compare_Name> EventCreatorContainerType ; 00061 #else 00062 typedef __gnu_cxx::hash_map<Name, EventCreator *, Name::hash_compare_Name> EventCreatorContainerType ; 00063 #endif 00064 00065 static EventCreatorContainerType * getEventCreatorContainer() ; 00066 }; 00067 } // namespace OMK 00068 #endif // OMKEVENTCREATORHEADER
Documentation generated on Mon Jun 9 11:45:56 2008 |
Generated with doxygen by Dimitri van Heesch , 1997-2007 |