#include <s11n.net/s11n/plugin/path_finder.hpp>
#include <s11n.net/s11n/plugin/plugin_config.hpp>
Go to the source code of this file.
Namespaces | |
namespace | s11n |
namespace | s11n::plugin |
Defines | |
#define | plugin_PLUGIN_HPP_INCLUDED 1 |
Functions | |
path_finder & | path () |
The shared lookup path for plugins. | |
std::string | find (const std::string &basename) |
Returns path().find( basename ). | |
std::string | open (const std::string &basename) |
Uses find(basename) to search for a file and, if successful, opens it using a platforms-specific DLL opener. | |
std::string | dll_error () |
Called immediately after open() fails, it returns a platforms-specific error string. |
|
Definition at line 2 of file plugin.hpp. |
|
Called immediately after open() fails, it returns a platforms-specific error string. On platforms using libdl or libltdl, this function returns the result of calling dlerror() or lt_dlerror(), respectively. On Windows platforms it always returns an empty string (anyone now how to get such error strings from Windows?). Calling this twice in a row will, without calling open() in between always cause an empty string to be returned on the second call. See the man pages for dlerror() or lt_dlerror() for more details on this, though this function also behaves that way under Win32. |
|
Returns path().find( basename ).
|
|
Uses find(basename) to search for a file and, if successful, opens it using a platforms-specific DLL opener. It does not manipulate the DLL except to open it. The handle to the DLL is lost: it will be closed by the OS when the application exits. (The reasons for this are documented in the paper entitled "Classloading in C++", available from http://s11n.net/papers/.) Returns the path to the DLL, or an empty string on error. There is currently no way of knowing what the error might have been. The path() is used to find the DLL. If basename is an absolute path to an existing file, it will be used as-is, which means that a client-specified path_finder object may be used to find DLLs, and then pass them to this function to do the platform-specific work of opening the DLL. |
|
The shared lookup path for plugins. It is initialized to contain a path and list of extensions defined in plugin_config.hpp. |