Loading...
Searching...
No Matches
dlhandler.h
Go to the documentation of this file.
/**********************************************************************
dlhandler.h - Dynamic loader for file format modules.
Copyright (C) 2004-2005 by Chris Morley
This file is part of the Open Babel project.
For more information, see <http://openbabel.org/>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
***********************************************************************/
#ifndef OB_DLHANDLER_H
#define OB_DLHANDLER_H
#include <openbabel/babelconfig.h>
#include <string>
#include <vector>
// These macros are used in DLL builds. If they have not
// been set in babelconfig.h, define them as nothing.
#ifndef OBERROR
#define OBERROR
#endif
#ifndef OBDLL
#define OBDLL
#endif
class OBERROR DLHandler
{
public:
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);
};
#endif /* DLHANDLER_H*/
DLHandler
Interface for dynamic libraries.
Definition dlhandler.h:47
DLHandler::getConvDirectory
static bool getConvDirectory(std::string &convPath)
Definition dlhandler_unix.cpp:62
DLHandler::getFormatFilePattern
static const char * getFormatFilePattern()
Definition dlhandler_unix.cpp:176
DLHandler::openLib
static bool openLib(const std::string &lib_name)
Open a dynamic library with path lib_name.
Definition dlhandler_unix.cpp:163
DLHandler::Sleep
static void Sleep(int n)
Call the system routine to wait (sleep) this process for n seconds.
Definition dlhandler_win32.cpp:143
DLHandler::getSeparator
static char getSeparator()
Definition dlhandler_unix.cpp:181
DLHandler::findFiles
static int findFiles(std::vector< std::string > &file_list, const std::string &pattern, const std::string &path)
Definition dlhandler_unix.cpp:74