00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef SGE_PLUGIN_MANAGER_HPP_INCLUDED
00022 #define SGE_PLUGIN_MANAGER_HPP_INCLUDED
00023
00024 #include "capabilities.hpp"
00025 #include "context_base.hpp"
00026 #include "iterator.hpp"
00027 #include "category_array.hpp"
00028 #include "../export.hpp"
00029 #include <boost/noncopyable.hpp>
00030 #include <vector>
00031 #include <map>
00032 #include <cstddef>
00033
00034 namespace sge
00035 {
00036 namespace plugin
00037 {
00038
00039 class manager : boost::noncopyable {
00040 typedef std::vector<context_base> plugin_array;
00041 typedef std::map<capabilities::type, category_array> plugin_map;
00042 public:
00043 typedef std::size_t size_type;
00044
00045 SGE_SYMBOL manager();
00046
00047 template<typename T>
00048 SGE_SYMBOL iterator<T> begin();
00049
00050 template<typename T>
00051 SGE_SYMBOL iterator<T> end();
00052
00053 template<typename T>
00054 SGE_SYMBOL typename iterator<T>::reference get_plugin(
00055 size_type index = 0);
00056
00057 template<typename T>
00058 SGE_SYMBOL size_type size() const;
00059 private:
00060 plugin_array plugins;
00061 plugin_map categories;
00062 };
00063
00064 }
00065 }
00066
00067 #endif