summaryrefslogtreecommitdiff
path: root/cpp/include/Ice/DynamicLibrary.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/include/Ice/DynamicLibrary.h')
-rw-r--r--cpp/include/Ice/DynamicLibrary.h49
1 files changed, 45 insertions, 4 deletions
diff --git a/cpp/include/Ice/DynamicLibrary.h b/cpp/include/Ice/DynamicLibrary.h
index c158de0b982..ac520e2f946 100644
--- a/cpp/include/Ice/DynamicLibrary.h
+++ b/cpp/include/Ice/DynamicLibrary.h
@@ -24,17 +24,58 @@ public:
DynamicLibrary();
~DynamicLibrary();
- bool load(const std::string&);
-
#ifdef _WIN32
typedef FARPROC symbol_type;
#else
typedef void* symbol_type;
#endif
- symbol_type getSymbol(const std::string&); // Returns 0 if no match found
+ //
+ // Load an entry point. This is really a convenience function
+ // which combines calls to load() and getSymbol(). However,
+ // it does add some value.
+ //
+ // An entry point has the following format:
+ //
+ // name[,version]:function
+ //
+ // The name of the library is constructed from the given
+ // information. If no version is supplied, the Ice version
+ // is used. For example, consider the following entry point:
+ //
+ // foo:create
+ //
+ // This would result in libfoo.so.0.0.1 (Unix) and foo001.dll (Windows),
+ // where the Ice version is 0.0.1.
+ //
+ // Now consider this entry point:
+ //
+ // foo,1.1:create
+ //
+ // The library names in this case are libfoo.so.1.1 (Unix) and
+ // foo11.dll (Windows).
+ //
+ // On Windows platforms, a 'd' is appended to the version for debug
+ // builds.
+ //
+ // Returns 0 if a failure occurred.
+ //
+ symbol_type loadEntryPoint(const std::string&);
+
+ //
+ // Open a library with the given path.
+ //
+ bool load(const std::string&);
+
+ //
+ // Retrieve a symbol from the library. Returns 0 if no match is found.
+ //
+ symbol_type getSymbol(const std::string&);
- const std::string& getErrorMessage() const; // Error message for last failure
+ //
+ // Get the error message for the last failure.
+ //
+ const std::string& getErrorMessage() const;
private: