00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef __BehaviorControlSelector_h_
00012 #define __BehaviorControlSelector_h_
00013
00014 #include "Tools/Module/ModuleSelector.h"
00015
00016 #include "BehaviorControl.h"
00017 #include "GT2005BehaviorControl/GT2005BehaviorControl.h"
00018
00019
00020
00021
00022
00023
00024 class BehaviorControlSelector : public ModuleSelector, public BehaviorControlInterfaces
00025 {
00026 public:
00027
00028
00029
00030
00031
00032 BehaviorControlSelector(ModuleHandler &handler, const BehaviorControlInterfaces& interfaces)
00033 : ModuleSelector(SolutionRequest::behaviorControl),
00034 BehaviorControlInterfaces(interfaces)
00035 {
00036 handler.setModuleSelector(SolutionRequest::behaviorControl, this);
00037 }
00038
00039
00040
00041
00042
00043
00044
00045
00046 virtual Module* createSolution(SolutionRequest::ModuleSolutionID id)
00047 {
00048 switch(id)
00049 {
00050 case SolutionRequest::gt2005BehaviorControlAgentSoccer:
00051 return new Xabsl2BehaviorControlAgentInterface("soccer",new GT2005BehaviorControl(*this),*this);
00052
00053 case SolutionRequest::gt2005BehaviorControlAgentPenaltyShooter:
00054 return new Xabsl2BehaviorControlAgentInterface("penalty-shooter",new GT2005BehaviorControl(*this),*this);
00055
00056 case SolutionRequest::gt2005BehaviorControlAgentPenaltyShooter2:
00057 return new Xabsl2BehaviorControlAgentInterface("penalty-shooter2",new GT2005BehaviorControl(*this),*this);
00058
00059 case SolutionRequest::gt2005BehaviorControlAgentPenaltyGoalie:
00060 return new Xabsl2BehaviorControlAgentInterface("penalty-goalie",new GT2005BehaviorControl(*this),*this);
00061
00062 case SolutionRequest::gt2005BehaviorControlAgentJoystickControlled:
00063 return new Xabsl2BehaviorControlAgentInterface("joystick-controlled",new GT2005BehaviorControl(*this),*this);
00064
00065 case SolutionRequest::gt2005BehaviorControlAgentSlamChallange:
00066 return new Xabsl2BehaviorControlAgentInterface("slam", new GT2005BehaviorControl(*this),*this);
00067
00068 case SolutionRequest::gt2005BehaviorControlAgentVLCshooter:
00069 return new Xabsl2BehaviorControlAgentInterface("vlc-shooter",new GT2005BehaviorControl(*this),*this);
00070
00071 case SolutionRequest::gt2005BehaviorControlAgentVLC2shooter:
00072 return new Xabsl2BehaviorControlAgentInterface("vlc2-shooter",new GT2005BehaviorControl(*this),*this);
00073
00074 case SolutionRequest::gt2005BehaviorControlAgentObstacleAvoidanceChallange03:
00075 return new Xabsl2BehaviorControlAgentInterface("obstacle-avoidance-agent", new GT2005BehaviorControl(*this),*this);
00076
00077 case SolutionRequest::gt2005BehaviorControlAgentOdometryTester:
00078 return new Xabsl2BehaviorControlAgentInterface("odometry-tester", new GT2005BehaviorControl(*this),*this);
00079
00080 case SolutionRequest::gt2005BehaviorControlAgentGuideDog:
00081 return new Xabsl2BehaviorControlAgentInterface("guide-dog",new GT2005BehaviorControl(*this),*this);
00082
00083 case SolutionRequest::gt2005BehaviorControlAgentBlindDog:
00084 return new Xabsl2BehaviorControlAgentInterface("blind-dog",new GT2005BehaviorControl(*this),*this);
00085
00086 case SolutionRequest::gt2005BehaviorControlAgentKickLogger:
00087 return new Xabsl2BehaviorControlAgentInterface("kick-logger",new GT2005BehaviorControl(*this),*this);
00088
00089 case SolutionRequest::gt2005BehaviorControlAgentBasicsTester:
00090 return new Xabsl2BehaviorControlAgentInterface("basics-tester",new GT2005BehaviorControl(*this),*this);
00091
00092 default:
00093 return 0;
00094 }
00095 }
00096
00097 };
00098
00099 #endif // __BehaviorControlSelector_h_