From 97d93c670e1ef91b1a346c9cbb6ad47c4e26953e Mon Sep 17 00:00:00 2001 From: Hayodea Hekol Date: Tue, 30 Sep 2025 01:15:02 -0400 Subject: [PATCH] Indentation --- smocore/include/senseApis/senseApiLib.h | 104 ++++++++++++------------ 1 file changed, 52 insertions(+), 52 deletions(-) diff --git a/smocore/include/senseApis/senseApiLib.h b/smocore/include/senseApis/senseApiLib.h index 101cc39..0ff1a71 100644 --- a/smocore/include/senseApis/senseApiLib.h +++ b/smocore/include/senseApis/senseApiLib.h @@ -15,70 +15,70 @@ namespace sense_api { class SenseApiLib { private: - friend class SenseApiManager; - struct DlCloser - { - void operator()(void* handle) const - { - if (handle) { - dlclose(handle); - } - } - }; + friend class SenseApiManager; + struct DlCloser + { + void operator()(void* handle) const + { + if (handle) { + dlclose(handle); + } + } + }; public: - SenseApiLib( - const std::string& path, void *_dlopen_handle, - SMO_GET_SENSE_API_DESC_FN_TYPEDEF *descFn) - : libraryPath(path), qutex("SenseApiLib-" + path), + SenseApiLib( + const std::string& path, void *_dlopen_handle, + SMO_GET_SENSE_API_DESC_FN_TYPEDEF *descFn) + : libraryPath(path), qutex("SenseApiLib-" + path), dlopen_handle(_dlopen_handle, DlCloser()), SMO_GET_SENSE_API_DESC_FN_NAME(descFn) - {} + {} - void setSenseApiDesc(const SenseApiDesc &desc) - { - if (!SenseApiDesc::sanityCheck(desc)) - { - throw std::runtime_error( - std::string(__func__) + ": Sanity check failed for sense API " - "descriptor in library '" + libraryPath + "'"); - } + void setSenseApiDesc(const SenseApiDesc &desc) + { + if (!SenseApiDesc::sanityCheck(desc)) + { + throw std::runtime_error( + std::string(__func__) + ": Sanity check failed for sense API " + "descriptor in library '" + libraryPath + "'"); + } - senseApiDesc = desc; - } + senseApiDesc = desc; + } public: - std::string libraryPath; + std::string libraryPath; Qutex qutex; - std::unique_ptr dlopen_handle; - /* UNIMPLEMENTED: API-specific cmdline options. These affect this specific - * sense api lib's behaviour globally. - */ - std::vector options; + std::unique_ptr dlopen_handle; + /* UNIMPLEMENTED: API-specific cmdline options. These affect this specific + * sense api lib's behaviour globally. + */ + std::vector options; - /** - * @brief Every sense API lib is required to provide a function that returns - * a SenseApiDesc struct. This struct states which API the lib uses to - * connect Salmanoff to the sense provider it supports. - * - * This getter function should be visible to dlsym() so that Salmanoff can - * find it in the lib after loading it, and call it. - */ - std::function - SMO_GET_SENSE_API_DESC_FN_NAME; + /** + * @brief Every sense API lib is required to provide a function that returns + * a SenseApiDesc struct. This struct states which API the lib uses to + * connect Salmanoff to the sense provider it supports. + * + * This getter function should be visible to dlsym() so that Salmanoff can + * find it in the lib after loading it, and call it. + */ + std::function + SMO_GET_SENSE_API_DESC_FN_NAME; - /** - * @brief Salmanoff will call the `SMO_GET_SENSE_API_DESC_FN_NAME` getter - * function and use the data it provides in order to fill out this - * descriptor. - */ - SenseApiDesc senseApiDesc; + /** + * @brief Salmanoff will call the `SMO_GET_SENSE_API_DESC_FN_NAME` getter + * function and use the data it provides in order to fill out this + * descriptor. + */ + SenseApiDesc senseApiDesc; - std::string stringify() const { - std::string result = "Library Path: " + libraryPath + "\n"; - result += "Sense API Descriptor: " + senseApiDesc.stringify() + "\n"; - return result; - } + std::string stringify() const { + std::string result = "Library Path: " + libraryPath + "\n"; + result += "Sense API Descriptor: " + senseApiDesc.stringify() + "\n"; + return result; + } }; } // namespace sense_api