ansys::dpf::LibraryHandle Class Reference
Last update: 10.07.2023
ansys::dpf::LibraryHandle Class Reference
Provides an access to use DPF HGP API. The instance of LibraryHandle is only needed once. More...
#include <dpf_api_base.h>
Public Member Functions | |
LibraryHandle (std::string const &key="common", std::string const &shared_object_root_name="DataProcessingCore", LoadType load_type=LoadType::try_load, std::string const &dpf_client_api="DPFClientAPI") | |
LibraryHandle (Context const &context, std::string const &key="common", std::string const &shared_object_root_name="DataProcessingCore", LoadType load_type=LoadType::try_load, std::string const &dpf_client_api="DPFClientAPI") | |
LibraryHandle (std::string const &path_to_shared_object, Context const &context, std::string const &key="common", std::string const &shared_object_root_name="DataProcessingCore", LoadType load_type=LoadType::try_load, std::string const &path_to_dpf_client_api="", std::string const &dpf_client_api="DPFClientAPI") | |
LibraryHandle (std::string const &key, std::string const &shared_object_root_name, ApiType api_type, LoadType load_type=LoadType::try_load, std::string const &dpf_client_api="DPFClientAPI") | |
LibraryHandle (so::API *api) | |
LibraryHandle (const LibraryHandle &)=delete | |
LibraryHandle (LibraryHandle &&)=delete | |
LibraryHandle & | operator= (const LibraryHandle &)=delete |
LibraryHandle & | operator= (LibraryHandle &&)=delete |
so::API const * | callAPI () const |
ansys::dpf::DpfError const & | error () const |
Detailed Description
Provides an access to use DPF HGP API. The instance of LibraryHandle is only needed once.
Wraps dataProcessingCore loading in an RAII (Resource acquisition is initialization) structure in order to ensure correct loading/unloading of the DPF core functionalities. Must be the first call made to DPF API.
Constructor & Destructor Documentation
◆ LibraryHandle() [1/4]
ansys::dpf::LibraryHandle::LibraryHandle | ( | std::string const & | key = "common" , |
std::string const & | shared_object_root_name = "DataProcessingCore" , |
||
LoadType | load_type = LoadType::try_load , |
||
std::string const & | dpf_client_api = "DPFClientAPI" |
||
) |
Must be the first call made to DPF API.
- Parameters
-
[in] key Key used to identify the API (e.g. common, remote...). [in] shared_object_root_name Library name of the DPF API to load (e.g. DataProcessingCore that implements the core DPF symbols, Ans.Dpf.GrpcClient that implements the remote gRPC DPF symbols...). [in] load_type Enum that provides settings at API loading step.
◆ LibraryHandle() [2/4]
ansys::dpf::LibraryHandle::LibraryHandle | ( | Context const & | context, |
std::string const & | key = "common" , |
||
std::string const & | shared_object_root_name = "DataProcessingCore" , |
||
LoadType | load_type = LoadType::try_load , |
||
std::string const & | dpf_client_api = "DPFClientAPI" |
||
) |
Must be the first call made to DPF API. Using a Context that defines specific settings.
- Parameters
-
[in] context Context object that defines settings to load the DPF APIs. [in] key Key used to identify the API (e.g. common, remote...). [in] shared_object_root_name Library name of the DPF API to load (e.g. DataProcessingCore that implements the core DPF symbols, Ans.Dpf.GrpcClient that implements the remote gRPC DPF symbols...). [in] load_type Enum that provides settings at API loading step.
◆ LibraryHandle() [3/4]
ansys::dpf::LibraryHandle::LibraryHandle | ( | std::string const & | path_to_shared_object, |
Context const & | context, | ||
std::string const & | key = "common" , |
||
std::string const & | shared_object_root_name = "DataProcessingCore" , |
||
LoadType | load_type = LoadType::try_load , |
||
std::string const & | path_to_dpf_client_api = "" , |
||
std::string const & | dpf_client_api = "DPFClientAPI" |
||
) |
Must be the first call made to DPF API. Using a Context that defines specific settings.
- Parameters
-
[in] path_to_shared_object path to DataProcessingCore.dll or libDataProcessingCore.so. [in] context Context object that defines settings to load the DPF APIs. [in] key Key used to identify the API (e.g. common, remote...). [in] shared_object_root_name Library name of the DPF API to load (e.g. DataProcessingCore that implements the core DPF symbols, Ans.Dpf.GrpcClient that implements the remote gRPC DPF symbols...). [in] load_type Enum that provides settings at API loading step. [in] path_to_dpf_client_api path to DPFClientAPI.dll or libDPFClientAPI.so, takes path_to_shared_object by default.
◆ LibraryHandle() [4/4]
ansys::dpf::LibraryHandle::LibraryHandle | ( | std::string const & | key, |
std::string const & | shared_object_root_name, | ||
ApiType | api_type, | ||
LoadType | load_type = LoadType::try_load , |
||
std::string const & | dpf_client_api = "DPFClientAPI" |
||
) |
- Deprecated:
- This call is deprecated. usage is not maintained.