00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019
00020
00021 #ifndef SOMELIB_FACTORY_HEADER
00022 #define SOMELIB_FACTORY_HEADER
00023
00024 #include <string>
00025 #include <deque>
00026 #include <vector>
00027 #include <set>
00028
00029 #include "SOMELibCatalog.h"
00030 #include "SOMEClassCatalog.h"
00031 #include "BasicDynLib.h"
00032 #include "Path.h"
00033 #include <string>
00034
00035 namespace SOME
00036 {
00037
00041 class LibFactory
00042 {
00043 public:
00044 void addLib(const std::string& path);
00045 void addLib(SOME::Path& path);
00046 const ClassCatalog& getClassCatalog(const std::string&);
00047 std::vector < ClassCatalog > getCategory(const std::string&);
00048 std::vector < ClassCatalog > getByCategory(const std::string&, const std::string&);
00049 std::string getLibExtension();
00051 std::set < std::string > enumCategory( const std::string& key );
00052 std::set < std::string > enumCategory( const std::string& key, std::map < std::string, std::string > &catmap );
00053
00054
00055
00056 std::vector < ClassCatalog > getByCategory( std::map < std::string, std::string > &keys );
00057
00058 private:
00059 LibFactory();
00060 friend LibFactory& getLibFactory();
00061
00062 private:
00063 typedef std::deque < LibCatalog > LibContainer;
00064 LibContainer libs;
00065 };
00066
00067 LibFactory& getLibFactory();
00068
00069 std::string searchForLib(const std::string& dir, const std::string& name);
00070
00071 }
00072
00073 #endif //SOMELIB_FACTORY_HEADER