Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# ACE_Lib_Find Class Reference

This class includes all the static function calls needed to search and open shared libraries. More...

`#include <Lib_Find.h>`

Inheritance diagram for ACE_Lib_Find:

[legend]
List of all members.

## Static Public Methods
int | ldfind (const ACE_TCHAR *filename, ACE_TCHAR *pathname, size_t maxlen)
| 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). More...
FILE * | ldopen (const ACE_TCHAR *filename, const ACE_TCHAR *type)
| Uses <ldfind> to locate and open the appropriate <filename> and returns a pointer to the file, else it returns a NULL pointer. More...
ACE_TCHAR * | ldname (const ACE_TCHAR *entry_point)
| Transforms <entry_point> into a form that can be located in a dynamic library using. More...
int | get_temp_dir (ACE_TCHAR *buffer, size_t buffer_len)
| Returns the temporary directory including the trailing slash in <buffer>. More...
ACE_HANDLE | open_temp_file (const ACE_TCHAR *name, int mode, int perm=0)
| Opening the temp file. File is automagically unlinked when it is closed. This is useful for have temp files. More...
size_t | strrepl (char *s, char search, char replace)
| Replace all instances of <search> in <s> with <replace>. Returns the number of replacements made. More...
char * | strsplit_r (char *s, const char *token, char *&next_start)
| Splits string <s> into pieces separated by the string <token>. More...
size_t | strrepl (wchar_t *s, wchar_t search, wchar_t replace)
| As strrepl, but for wide characters. More...
wchar_t * | strsplit_r (wchar_t *s, const wchar_t *token, wchar_t *&next_start)
| As strsplit_r, but for wide characters. More...

## Detailed Description

This class includes all the static function calls needed to search and open shared libraries.

## Member Function Documentation

int ACE_Lib_Find::get_temp_dir | ( | ACE_TCHAR * | buffer,
|  | size_t | buffer_len
| ) | `[static]`

| Returns the temporary directory including the trailing slash in <buffer>. Returns -1 for an error or if the buffer_len is not long enough.

int ACE_Lib_Find::ldfind | ( | const ACE_TCHAR * | filename,
|  | ACE_TCHAR * | pathname,
|  | size_t | maxlen
| ) | `[static]`

| 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 <filename> doesn't match directly.

ACE_TCHAR * ACE_Lib_Find::ldname | ( | const ACE_TCHAR * | entry_point | ) | `[static]`

| Transforms <entry_point> into a form that can be located in a dynamic library using. <dlsym>. For example, with Win32/Borland extern "C" functions which use the default calling convention have a '_' prepended. Always returns a buffer that has been dynamically allocated using <operator new>.

FILE * ACE_Lib_Find::ldopen | ( | const ACE_TCHAR * | filename,
|  | const ACE_TCHAR * | type
| ) | `[static]`

| Uses <ldfind> to locate and open the appropriate <filename> and returns a pointer to the file, else it returns a NULL pointer. <type> specifies how the file should be open.

ACE_HANDLE ACE_Lib_Find::open_temp_file | ( | const ACE_TCHAR * | name,
|  | int | mode,
|  | int | perm = 0
| ) | `[static]`

| Opening the temp file. File is automagically unlinked when it is closed. This is useful for have temp files.

size_t ACE_Lib_Find::strrepl | ( | wchar_t * | s,
|  | wchar_t | search,
|  | wchar_t | replace
| ) | `[static]`

| As strrepl, but for wide characters.

size_t ACE_Lib_Find::strrepl | ( | char * | s,
|  | char | search,
|  | char | replace
| ) | `[static]`

| Replace all instances of <search> in <s> with <replace>. Returns the number of replacements made.

wchar_t * ACE_Lib_Find::strsplit_r | ( | wchar_t * | str,
|  | const wchar_t * | token,
|  | wchar_t *& | next_start
| ) | `[static]`

| As strsplit_r, but for wide characters.

char * ACE_Lib_Find::strsplit_r | ( | char * | str,
|  | const char * | token,
|  | char *& | next_start
| ) | `[static]`

| Splits string <s> into pieces separated by the string <token>. <next_start> is an opaque cookie handed back by the call to store its state for the next invocation, thus making it re-entrant. This operates very similar to Perl's <split> function except that it returns pieces one at a time instead of into an array.

The documentation for this class was generated from the following files:

- Lib_Find.h
- Lib_Find.cpp