46 return Poco::SharedLibrary::suffix();
56 "class_loader.ClassLoader: " 57 "Constructing new ClassLoader (%p) bound to library %s.",
58 this, library_path.c_str());
67 "class_loader.ClassLoader: " 68 "Destroying class loader, unloading associated library...\n");
97 boost::recursive_mutex::scoped_lock plugin_ref_lock;
98 if (lock_plugin_ref_count) {
104 "class_loader.ClassLoader: " 105 "SEVERE WARNING!!! Attempting to unload library while objects created by this loader " 106 "exist in the heap! " 107 "You should delete your objects before attempting to unload the library or " 108 "destroying the ClassLoader. The library will NOT be unloaded.");
#define CONSOLE_BRIDGE_logWarn(fmt,...)
bool isLibraryLoaded()
Indicates if a library is loaded within the scope of this ClassLoader. Note that the library may alre...
boost::recursive_mutex plugin_ref_count_mutex_
std::string library_path_
void loadLibrary(const std::string &library_path, ClassLoader *loader)
Loads a library into memory if it has not already been done so. Attempting to load an already loaded ...
#define CONSOLE_BRIDGE_logDebug(fmt,...)
bool ondemand_load_unload_
std::string systemLibrarySuffix()
ClassLoader(const std::string &library_path, bool ondemand_load_unload=false)
Constructor for ClassLoader.
void unloadLibrary(const std::string &library_path, ClassLoader *loader)
Unloads a library if it loaded in memory and cleans up its corresponding class factories. If it is not loaded, the function has no effect.
int unloadLibraryInternal(bool lock_plugin_ref_count)
As the library may be unloaded in "on-demand load/unload" mode, unload maybe called from createInstan...
bool isLibraryLoadedByAnyClassloader()
Indicates if a library is loaded by some entity in the plugin system (another ClassLoader), but not necessarily loaded by this ClassLoader.
bool isOnDemandLoadUnloadEnabled()
Indicates if the library is to be loaded/unloaded on demand...meaning that only to load a lib when th...
int unloadLibrary()
Attempts to unload a library loaded within scope of the ClassLoader. If the library is not opened...
bool isLibraryLoaded(const std::string &library_path, ClassLoader *loader)
Indicates if passed library loaded within scope of a ClassLoader. The library maybe loaded in memory...
virtual ~ClassLoader()
Destructor for ClassLoader. All libraries opened by this ClassLoader are unloaded automatically...
static bool has_unmananged_instance_been_created_
std::string getLibraryPath()
Gets the full-qualified path and name of the library associated with this class loader.
bool isLibraryLoadedByAnybody(const std::string &library_path)
Indicates if passed library has been loaded by ANY ClassLoader.
void loadLibrary()
Attempts to load a library on behalf of the ClassLoader. If the library is already opened...
static bool hasUnmanagedInstanceBeenCreated()
Getter for if an unmanaged (i.e. unsafe) instance has been created flag.
boost::recursive_mutex load_ref_count_mutex_