- DLLFactory(char *fname, char *func_name=0) : DLLFactoryBase(fname,func_name)
- {
- if (factory_func)
- factory = (T*)factory_func();
- else
- factory = 0;
- }
-
- ~DLLFactory()
+ /** Attempts to load the specified module.
+ * @param name The name of the library to load.
+ */
+ DLLManager(const std::string& name);
+
+ /** Unloads the module if one was loaded. */
+ ~DLLManager();
+
+ /** Attempts to create a new module instance from this shared library.
+ * @return Either a new instance of the Module class or NULL on error.
+ */
+ Module* CallInit();
+
+ /** Retrieves the value of the specified symbol.
+ * @param name The name of the symbol to retrieve.
+ * @return Either the value of the specified symbol or or NULL if it does not exist.
+ */
+ void* GetSymbol(const char* name) const;
+
+ /** Retrieves the value of the specified symbol and casts it to the requested type.
+ * @param name The name of the symbol to retrieve.
+ * @return Either the value of the specified symbol or or NULL if it does not exist.
+ */
+ template <typename TReturn>
+ TReturn* GetSymbol(const char* name) const