#177 Class loader: option for loadLibrary

Undecided
open
nobody
None
1
2013-11-15
2013-07-05
nj0y
No

It would be nice to be able to use loadLibrary with a boolean flag that specifies if the instance of Poco::SharedLibrary will be created with the Poco::SharedLibrary::SHLIB_LOCAL option or not.

For example (ClassLoader.h):

void loadLibrary(const std::string& path, const std::string& manifest, bool isShlibLocal = false)

(notice the last parameter)

        // ...
        LibraryInfo li;
        if(isShlibLocal)
        {
            li.pLibrary  = new SharedLibrary(path, Poco::SharedLibrary::SHLIB_LOCAL);
        }
        else
        {
            li.pLibrary = new SharedLibrary(path);
        }
        li.pManifest = new Manif();
        // ...

And of course this parameter should also be usable with the other overload:

void loadLibrary(const std::string& path, bool isShlibLocal = false)

Discussion