EventFactory.cpp

00001 /***************************************************************************
00002  *                                                                         *
00003  *   (c) Art Tevs, MPI Informatik Saarbruecken                             *
00004  *       mailto: <tevs@mpi-sb.mpg.de>                                      *
00005  *                                                                         *
00006  *   This program is free software; you can redistribute it and/or modify  *
00007  *   it under the terms of the GNU General Public License as published by  *
00008  *   the Free Software Foundation; either version 2 of the License, or     *
00009  *   (at your option) any later version.                                   *
00010  *                                                                         *
00011  ***************************************************************************/
00012 
00013 //----------------------------------------------------------------------------------
00014 // Includes
00015 //----------------------------------------------------------------------------------
00016 #include "EventFactory.h"
00017 #include "EventManager.h"
00018 
00019 namespace nrEngine{
00020 
00021         //------------------------------------------------------------------------
00022         EventFactory::EventFactory(const std::string& name): mName(name)
00023         {
00024         }
00025 
00026         //------------------------------------------------------------------------
00027         EventFactory::~EventFactory(){
00028                 // say the event manager, that it must be removed
00029                 //if (EventManager::isValid()){
00030                 //      EventManager::GetSingleton().removeFactory(mName);
00031                 //}
00032         }
00033 
00034         //------------------------------------------------------------------------
00035         bool EventFactory::isSupported(const std::string& eventType) const
00036         {
00037                 // iterate through the list and check
00038                 NameList::const_iterator it = mSupportedTypes.begin();
00039                 for (; it != mSupportedTypes.end(); it++)
00040                         if ((*it) == eventType) return true;
00041 
00042                 return false;
00043         }
00044 
00045 }; // end namespace
00046 

Generated on Wed Sep 12 23:19:42 2007 for nrEngine by  doxygen 1.5.1