00001 /** 00002 * @file CollisionDetectorSelector.h 00003 * 00004 * Definition of class CollisionDetectorSelector 00005 * 00006 * @author Daniel Göhring 00007 */ 00008 00009 #ifndef __CollisionDetectorSelector_h_ 00010 #define __CollisionDetectorSelector_h_ 00011 00012 #include "Tools/Module/ModuleSelector.h" 00013 00014 #include "GT2004CollisionDetector.h" 00015 00016 /** 00017 * CollisionDetector selection module. 00018 * 00019 * A selector for collision detector modules. 00020 */ 00021 class CollisionDetectorSelector : public ModuleSelector, public CollisionDetectorInterfaces 00022 { 00023 public: 00024 /** 00025 * Constructor. 00026 * @param handler The module handler of the process. 00027 * @param interfaces The paramters of the CollisionDetector module. 00028 */ 00029 CollisionDetectorSelector(ModuleHandler &handler, const CollisionDetectorInterfaces& interfaces) 00030 : ModuleSelector(SolutionRequest::collisionDetector), 00031 CollisionDetectorInterfaces(interfaces) 00032 { 00033 handler.setModuleSelector(SolutionRequest::collisionDetector, this); 00034 } 00035 00036 /** 00037 * Is called on start and when the selected solution changes 00038 * to create a specific solution. 00039 * @param id The id of the solution to create 00040 * @return The created solution or 0 00041 */ 00042 virtual Module* createSolution(SolutionRequest::ModuleSolutionID id) 00043 { 00044 switch(id) 00045 { 00046 case SolutionRequest::gt2004CollisionDetector: 00047 return new GT2004CollisionDetector(*this); 00048 00049 default: 00050 return 0; 00051 } 00052 } 00053 }; 00054 00055 #endif // CollisionDetectorSelector_h_ 00056 00057 /* 00058 * Change log : 00059 * 00060 * $Log: CollisionDetectorSelector.h,v $ 00061 * Revision 1.2 2004/07/10 00:13:51 spranger 00062 * renaming for coderelease and preparations for gt2005 00063 * 00064 * Revision 1.1.1.1 2004/05/22 17:19:06 cvsadm 00065 * created new repository GT2004_WM 00066 * 00067 * Revision 1.3 2004/03/08 01:38:48 roefer 00068 * Interfaces should be const 00069 * 00070 * Revision 1.2 2004/01/21 14:31:58 loetzsch 00071 * Module Selectors create only the selected solution. 00072 * When the solution changes, the old solution is erased and the new 00073 * one ist created using createSolution(..) 00074 * 00075 * Revision 1.1 2003/10/06 14:10:14 cvsadm 00076 * Created GT2004 (M.J.) 00077 * 00078 * Revision 1.1.1.1 2003/07/02 09:40:23 cvsadm 00079 * created new repository for the competitions in Padova from the 00080 * tamara CVS (Tuesday 2:00 pm) 00081 * 00082 * removed unused solutions 00083 * 00084 * Revision 1.1 2003/04/25 19:48:08 goehring 00085 * Added new module CollisionDetector 00086 * 00087 * 00088 */