diff options
Diffstat (limited to 'ace/Lib_Find.h')
-rw-r--r-- | ace/Lib_Find.h | 61 |
1 files changed, 29 insertions, 32 deletions
diff --git a/ace/Lib_Find.h b/ace/Lib_Find.h index bfaf6a98003..fefcce6439b 100644 --- a/ace/Lib_Find.h +++ b/ace/Lib_Find.h @@ -1,12 +1,7 @@ -// -*- C++ -*- - //============================================================================= /** * @file Lib_Find.h * - * All the static function calls needed to search and open shared - * libraries. - * * $Id$ * * @author Priyanka Gontla <pgontla@ece.uci.edu> @@ -21,32 +16,39 @@ #include "ace/ACE_export.h" #include "ace/os_include/os_stdio.h" - -namespace ACE +/** + * @class ACE_Lib_Find + * + * This class includes all the static function calls needed to search + * and open shared libraries. + */ +class ACE_Export ACE_Lib_Find { + public: + // = Methods for searching and opening shared libraries. /** - * Finds the file @a filename either using an absolute path or using + * Finds the file <filename> either using an absolute path or using * a relative path in conjunction with ACE_LD_SEARCH_PATH (e.g., * $LD_LIBRARY_PATH on UNIX or the directories scaned by Win32 API * SearchPath on Win32). This function will add appropriate suffix * (e.g., .dll on Win32 or .so on UNIX) according to the OS * platform. In addition, this function will apply the appropriate - * prefix (e.g., "lib" on UNIX and "" on Win32) if the @a filename + * prefix (e.g., "lib" on UNIX and "" on Win32) if the <filename> * doesn't match directly. */ - extern ACE_Export int ldfind (const ACE_TCHAR* filename, - ACE_TCHAR pathname[], - size_t maxpathnamelen); + static int ldfind (const ACE_TCHAR* filename, + ACE_TCHAR pathname[], + size_t maxpathnamelen); /** - * Uses @c ldfind to locate and open the appropriate @a filename and + * Uses <ldfind> to locate and open the appropriate <filename> and * returns a pointer to the file, else it returns a NULL - * pointer. @a type specifies how the file should be open. + * pointer. <type> specifies how the file should be open. */ - extern ACE_Export FILE *ldopen (const ACE_TCHAR *filename, - const ACE_TCHAR *type); + static FILE *ldopen (const ACE_TCHAR *filename, + const ACE_TCHAR *type); /** * Transforms <entry_point> into a form that can be located in a @@ -55,20 +57,20 @@ namespace ACE * have a '_' prepended. Always returns a buffer that has been * dynamically allocated using <operator new>. */ - extern ACE_Export ACE_TCHAR *ldname (const ACE_TCHAR *entry_point); + static ACE_TCHAR *ldname (const ACE_TCHAR *entry_point); /** * Returns the temporary directory including the trailing slash in * <buffer>. Returns -1 for an error or if the buffer_len is not * long enough. */ - extern ACE_Export int get_temp_dir (ACE_TCHAR *buffer, size_t buffer_len); + static int get_temp_dir (ACE_TCHAR *buffer, size_t buffer_len); /// Opening the temp file. File is automagically unlinked when it is /// closed. This is useful for have temp files. - extern ACE_Export ACE_HANDLE open_temp_file (const ACE_TCHAR *name, - int mode, - int perm = 0); + static ACE_HANDLE open_temp_file (const ACE_TCHAR *name, + int mode, + int perm = 0); // @@ Though the following functions dont come under the same category as // above, these are used only in the functions in this class. So it makes @@ -76,7 +78,7 @@ namespace ACE // /// Replace all instances of <search> in <s> with <replace>. Returns /// the number of replacements made. - extern ACE_Export size_t strrepl (char *s, char search, char replace); + static size_t strrepl (char *s, char search, char replace); /** * Splits string <s> into pieces separated by the string <token>. @@ -85,22 +87,17 @@ namespace ACE * This operates very similar to Perl's <split> function except that * it returns pieces one at a time instead of into an array. */ - extern ACE_Export char *strsplit_r (char *s, - const char *token, - char *&next_start); + static char *strsplit_r (char *s, const char *token, char *&next_start); #if defined (ACE_HAS_WCHAR) /// As strrepl, but for wide characters. - extern ACE_Export size_t strrepl (wchar_t *s, - wchar_t search, - wchar_t replace); + static size_t strrepl (wchar_t *s, wchar_t search, wchar_t replace); /// As strsplit_r, but for wide characters. - extern ACE_Export wchar_t *strsplit_r (wchar_t *s, - const wchar_t *token, - wchar_t *&next_start); + static wchar_t *strsplit_r (wchar_t *s, const wchar_t *token, + wchar_t *&next_start); #endif /* ACE_HAS_WCHAR */ -} +}; #include /**/ "ace/post.h" #endif /* ACE_LIB_FIND_H */ |