#include <openbabel/dlhandler.h>
Static Public Member Functions | |
static bool | getConvDirectory (std::string &convPath) |
static int | findFiles (std::vector< std::string > &file_list, const std::string &pattern, const std::string &path) |
static int | findFiles (std::vector< std::string > &file_list, const std::string &filename) |
static bool | openLib (const std::string &lib_name) |
static const char * | getFormatFilePattern () |
static char | getSeparator () |
static void | Sleep (int n) |
This class defines an interface for finding and opening dynamic loadable libraries on different platforms (e.g., modular plugins) via different source code files. It has only what is needed for OpenBabel and is not intended to be general purpose. Internally, it is used for dynamic loading and unloading OBFormat file translation modules.
bool getConvDirectory | ( | std::string & | convPath | ) | [static] |
Provides the path from which the conversion dynamic library, (OBConv.dll in Windows) was loaded. This is the default directory for the format files (*.obf in Windows)
Referenced by OBConversion::LoadFormatFiles().
int findFiles | ( | std::vector< std::string > & | file_list, | |
const std::string & | pattern, | |||
const std::string & | path | |||
) | [static] |
Searches a directory specified by path for files whose name matches a pattern which can include * as a wildcard. The path name should include a final separator (\ or /). The routine fills a vector of strings with the matching file names (including path). Note that this is not recursive: it only matches files in the specified path. For example, if path = e:\path\to\ and pattern = *.obf it will return vector entries lik e:\path\to\cmlformat.obf
Referenced by findFiles(), and OBConversion::LoadFormatFiles().
int findFiles | ( | std::vector< std::string > & | file_list, | |
const std::string & | filename | |||
) | [static] |
Searches for files which match a full filename (including the path) which contains a wildcard. The routine adds matching file names (including path) to a vector of strings .
bool openLib | ( | const std::string & | lib_name | ) | [static] |
const char * getFormatFilePattern | ( | ) | [static] |
Referenced by OBConversion::LoadFormatFiles(), and matchFiles().
char getSeparator | ( | ) | [static] |
Referenced by findFiles().
void Sleep | ( | int | n | ) | [static] |
Call the system routine to wait (sleep) this process for n
seconds.