00001 /* 00002 * ObstacleProviderContainer.hpp 00003 * 00004 * Created on: Dec 14, 2011 00005 * Author: mriedel 00006 */ 00007 00008 #ifndef OBSTACLEPROVIDERCONTAINER_HPP_ 00009 #define OBSTACLEPROVIDERCONTAINER_HPP_ 00010 00011 #include <telekyb_defines/telekyb_defines.hpp> 00012 00013 #include <obs_detection/ObstacleProvider.hpp> 00014 #include <pluginlib/class_loader.h> 00015 00016 // stl 00017 #include <set> 00018 00019 namespace TELEKYB_NAMESPACE { 00020 00021 class ObstacleProviderContainer { 00022 protected: 00023 pluginlib::ClassLoader<ObstacleProvider> obstacleProviderLoader; 00024 // Behaviorset. Contains all loaded Behaviors from all Containers! 00025 std::set<ObstacleProvider*> obstacleProviderInstances; 00026 00027 public: 00028 ObstacleProviderContainer(); 00029 virtual ~ObstacleProviderContainer(); 00030 00031 // should be const, but getDeclaredClasses is declared wrongly. 00032 void getAvailableObstacleProviders(std::vector<std::string>& obstacleProviderClassNames); 00033 00034 // returns 0 if fails 00035 ObstacleProvider* loadObstacleProvider(const std::string& obstacleProviderClassName); 00036 void unLoadObstacleProvider(ObstacleProvider* tm); 00037 00038 const std::set<ObstacleProvider*>& getLoadedObstacleProviders() const; 00039 00040 }; 00041 00042 } /* namespace telekyb */ 00043 #endif /* OBSTACLEPROVIDERCONTAINER_HPP_ */