From cfdeb17639c7cc931ef9c07d8d1c461e169724ee Mon Sep 17 00:00:00 2001 From: Hayodea Hakol Date: Tue, 14 Jan 2025 14:11:40 -0400 Subject: [PATCH] SenseApiMgr: Add doxygen comment explaining the lib search priorities --- hcore/senseApis/senseApiManager.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/hcore/senseApis/senseApiManager.cpp b/hcore/senseApis/senseApiManager.cpp index 71cae24..cbeaea5 100644 --- a/hcore/senseApis/senseApiManager.cpp +++ b/hcore/senseApis/senseApiManager.cpp @@ -13,6 +13,20 @@ namespace fs = std::filesystem; namespace hk { namespace sense_api { +/** + * @brief Searches for a library in predefined locations + * @param libraryPath The name or path of the library to find + * @return Optional containing the full path if found in search paths, nullopt + * if not + * + * Searches for the library in the following locations in order: + * 1. Custom path specified by --sense-api-lib-path option (if provided) + * 2. Current working directory + * 3. Directory containing the executable + * + * If the library is not found in any of these locations, returns nullopt and + * falls back to system default library search paths (LD_LIBRARY_PATH, etc.) + */ static std::optional findLibraryPath( const std::string& libraryPath) {