Main Page   Class Hierarchy   Compound List   File List   Compound Members  

SOMELibFactory.h

00001 /********************************************************************
00002 ** Copyright (C) 2000 SOMELib Project
00003 **
00004 ** This library is free software; you can redistribute it and/or
00005 ** modify it under the terms of the GNU Library General Public
00006 ** License as published by the Free Software Foundation; either
00007 ** version 2 of the License, or (at your option) any later version.
00008 **
00009 ** This library is distributed in the hope that it will be useful,
00010 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012 ** Library General Public License for more details.
00013 **
00014 ** You should have received a copy of the GNU Library General Public
00015 ** License along with this library; if not, write to the
00016 ** Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00017 ** Boston, MA  02111-1307, USA.
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     //fix this for Microsoft's build since it does not like maps
00055     //get all class catalogs whoes categories corraspond to entries in a map
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 } //namespace SOME
00072 
00073 #endif //SOMELIB_FACTORY_HEADER

Generated at Fri Dec 8 14:24:48 2000 for SOMELib by doxygen1.2.1 written by Dimitri van Heesch, © 1997-2000