From afce6e0ff6099470fd515cb92c13b232f48203ce Mon Sep 17 00:00:00 2001 From: schmidt Date: Sat, 21 Nov 1998 20:33:21 +0000 Subject: . --- ace/DLL.h | 57 +++++++++++++++++++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 24 deletions(-) (limited to 'ace/DLL.h') diff --git a/ace/DLL.h b/ace/DLL.h index cc00d5b3924..79abdc0f616 100644 --- a/ace/DLL.h +++ b/ace/DLL.h @@ -37,48 +37,57 @@ class ACE_Export ACE_DLL public: // = Initialization and termination methods. + ACE_DLL (int close_on_destruction = 0); + // Default constructor. + ACE_DLL (ACE_DL_TYPE dll_name = 0, - int mode = ACE_DEFAULT_SHLIB_MODE); - // Another way of initialisation wherein the user gives the - // library name and mode and thus the opening of the library is - // done implicitly along with the auto_close feature. - - ~ACE_DLL (void); - // Called when object is destroyed. + int open_mode = ACE_DEFAULT_SHLIB_MODE, + int close_on_destruction = 0); + // This is the library open operation that uses ACE_SHLIB_HANDLE + // object internally to open the library. The default mode is + // RTLD_LAZY which means that the identifier symbols are loaded but + // not the symbols for the functions. They are loaded dynamically + // on need. The other modes include: RTLD_NOW All necessary + // relocations are performed when the object is first loaded. + // RTLD_GLOBAL The object symbols are made available for the + // relocation processing of any other object. int open (ACE_DL_TYPE dll_name, - int mode = ACE_DEFAULT_SHLIB_MODE); - // This is the library open operation which uses ACE_SHLIB_HANDLE + int open_mode = ACE_DEFAULT_SHLIB_MODE, + int close_on_destruction = 0); + // This is the library open operation that uses ACE_SHLIB_HANDLE // object internally to open the library. The default mode is // RTLD_LAZY which means that the identifier symbols are loaded but - // not the symbols for the functions. - // They are loaded dynamically on need. - // The other modes include: - // RTLD_NOW All necessary relocations are performed when the - // object is first loaded. - // RTLD_GLOBAL The object symbols are made available for the - // relocation processing of any other object. + // not the symbols for the functions. They are loaded dynamically + // on need. The other modes include: RTLD_NOW All necessary + // relocations are performed when the object is first loaded. + // RTLD_GLOBAL The object symbols are made available for the + // relocation processing of any other object. - void *symbol (ACE_DL_TYPE sym_name); - // The symbol reference is returned corresponding to the symbol - // name. + ~ACE_DLL (void); + // Called when object is destroyed. int close (void); // The library is closed. + void *symbol (ACE_DL_TYPE sym_name); + // The symbol reference is returned corresponding to the symbol + // name. + char *error (void); // The error on any of the dl-procedures. - ACE_SHLIB_HANDLE get_handle (int orphan_mode); - // Return the handle to the user either forever or for temporary use. + ACE_SHLIB_HANDLE get_handle (int become_owner = 0); + // Return the handle to the user either forever or for temporary + // use. private: ACE_SHLIB_HANDLE handle_; // This is the reference to the library. - int close_mode_; - // This is the flag representing the special close_on_destruction - // feature. + int close_on_destruction_; + // This flag keeps track of whether we should close the handle + // automatically when the destructor is run. }; #endif /* ACE_DLL_H */ -- cgit v1.2.1