Open Babel  3.0
dlhandler.h
Go to the documentation of this file.
1 /**********************************************************************
2 dlhandler.h - Dynamic loader for file format modules.
3 
4 Copyright (C) 2004-2005 by Chris Morley
5 
6 This file is part of the Open Babel project.
7 For more information, see <http://openbabel.org/>
8 
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation version 2 of the License.
12 
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17 ***********************************************************************/
18 
19 #ifndef OB_DLHANDLER_H
20 #define OB_DLHANDLER_H
21 
22 #include <openbabel/babelconfig.h>
23 
24 #include <string>
25 #include <vector>
26 
27 // These macros are used in DLL builds. If they have not
28 // been set in babelconfig.h, define them as nothing.
29 #ifndef OBERROR
30  #define OBERROR
31 #endif
32 #ifndef OBDLL
33  #define OBDLL
34 #endif
35 
46 class OBERROR DLHandler
47 {
48 public:
49 
67  static bool getConvDirectory(std::string& convPath);
68 
80  static int findFiles (std::vector <std::string>& file_list,
81  const std::string& pattern, const std::string& path);
82 
89  static int findFiles (std::vector<std::string>& file_list,const std::string &filename);
90 
92  static bool openLib(const std::string& lib_name);
93 
95  static const char* getFormatFilePattern();
96 
98  static char getSeparator();
99 
101  static void Sleep(int n);
102 
103 };
104 
105 #endif /* DLHANDLER_H*/
106 
Interface for dynamic libraries.
Definition: dlhandler.h:46