|
CMSDK 2.0.1
Cross-platform C++ base library and SDK for the Psyclone AIOS platform
|
Thin RAII wrapper around a dynamically loaded library (LoadLibrary / dlopen). More...
#include <Utils.h>
Public Member Functions | |
| Library () | |
| ~Library () | |
| bool | load (const char *filename) |
| Load a library. | |
| LibraryFunction | getFunction (const char *funcName) |
| Resolve an exported function. | |
Static Public Member Functions | |
| static std::string | patchLibraryFilename (const char *filename, const char *path=NULL) |
| Normalize a library name into a platform filename (adds lib prefix / .dll, .so, .dylib suffix and optional path). | |
Thin RAII wrapper around a dynamically loaded library (LoadLibrary / dlopen).
| LibraryFunction cmlabs::utils::Library::getFunction | ( | const char * | funcName | ) |
Resolve an exported function.
| funcName | Symbol name. |
Definition at line 4715 of file Utils.cpp.
References LOG_SYSTEM, and LogPrint.
| bool cmlabs::utils::Library::load | ( | const char * | filename | ) |
Load a library.
| filename | Library file (see patchLibraryFilename()). |
Definition at line 4627 of file Utils.cpp.
References cmlabs::utils::GetCommandLinePath(), LOG_SYSTEM, LogPrint, patchLibraryFilename(), cmlabs::utils::StringFormat(), and cmlabs::utils::StringSingleReplace().
Referenced by cmlabs::utils::OpenLibrary().
|
static |
Normalize a library name into a platform filename (adds lib prefix / .dll, .so, .dylib suffix and optional path).
| filename | Base library name. |
| path | Optional directory. |
Definition at line 4597 of file Utils.cpp.
References cmlabs::utils::StringFormat(), cmlabs::utils::TextEndsWith(), and cmlabs::utils::TextStartsWith().
Referenced by load().