dlhandler.h

Go to the documentation of this file.
00001 /**********************************************************************
00002 dlhandler.h - Dynamic loader for file format modules.
00003 
00004 Copyright (C) 2004-2005 by Chris Morley
00005 
00006 This file is part of the Open Babel project.
00007 For more information, see <http://openbabel.sourceforge.net/>
00008 
00009 This program is free software; you can redistribute it and/or modify
00010 it under the terms of the GNU General Public License as published by
00011 the Free Software Foundation version 2 of the License.
00012 
00013 This program is distributed in the hope that it will be useful,
00014 but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016 GNU General Public License for more details.
00017 ***********************************************************************/
00018 
00019 #ifndef OB_DLHANDLER_H
00020 #define OB_DLHANDLER_H
00021 
00022 #include "babelconfig.h"
00023 
00024 #include <string>
00025 #include <vector>
00026 
00027 // These macros are used in DLL builds. If they have not
00028 // been set in babelconfig.h, define them as nothing.
00029 #ifndef OBCONV
00030         #define OBCONV
00031 #endif
00032 #ifndef OBDLL
00033         #define OBDLL
00034 #endif
00035 
00044 class OBCONV DLHandler
00045 {
00046 public:
00047 
00052         static bool getConvDirectory(std::string& convPath);
00053 
00063         static int findFiles (std::vector <std::string>& file_list, 
00064                         const std::string& pattern, const std::string& path);
00065 
00072         static int findFiles (std::vector<std::string>& file_list,const std::string &filename);
00073 
00075         static bool openLib(const std::string& lib_name);
00076 
00077         //To select OB format files
00078         static const char* getFormatFilePattern();
00079 
00080         static char getSeparator();
00081         static void Sleep(int n);
00082 
00083 };
00084 
00085 #endif  /* DLHANDLER_H*/
00086