ie_so_loader.h
Go to the documentation of this file.
1 // Copyright (C) 2018-2020 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4 
5 /**
6  * @brief A header file for definition of abstraction over platform specific shared objects
7  *
8  * @file ie_so_loader.h
9  */
10 #pragma once
11 
12 #include <memory>
13 
14 #include "ie_api.h"
15 
16 namespace InferenceEngine {
17 namespace details {
18 
19 /**
20  * @brief This class provides an OS shared module abstraction
21  */
22 class INFERENCE_ENGINE_API_CLASS(SharedObjectLoader) {
23  class Impl;
24  std::shared_ptr<Impl> _impl;
25 
26 public:
27  /**
28  * @brief A shared pointer to SharedObjectLoader
29  */
30  using Ptr = std::shared_ptr<SharedObjectLoader>;
31 
32 #ifdef ENABLE_UNICODE_PATH_SUPPORT
33  /**
34  * @brief Loads a library with the wide char name specified.
35  * @param pluginName Full or relative path to the plugin library
36  */
37  explicit SharedObjectLoader(const wchar_t* pluginName);
38 #endif
39 
40  /**
41  * @brief Loads a library with the name specified.
42  * @param pluginName Full or relative path to the plugin library
43  */
44  explicit SharedObjectLoader(const char * pluginName);
45 
46  /**
47  * @brief A destructor
48  */
49  ~SharedObjectLoader() noexcept(false);
50 
51  /**
52  * @brief Searches for a function symbol in the loaded module
53  * @param symbolName Name of function to find
54  * @return A pointer to the function if found
55  * @throws InferenceEngineException if the function is not found
56  */
57  void* get_symbol(const char* symbolName) const;
58 };
59 
60 } // namespace details
61 } // namespace InferenceEngine
The macro defines a symbol import/export mechanism essential for Microsoft Windows(R) OS.
Inference Engine C++ API.
Definition: cldnn_config.hpp:15