    

 ## On this page

  

 

 # ansys::dpf::LibraryHandle Class Reference

 Last update: 16.07.2025 

Provides an access to use DPF HGP API. The instance of [LibraryHandle](classansys_1_1dpf_1_1LibraryHandle.xhtml "Provides an access to use DPF HGP API. The instance of LibraryHandle is only needed once.") is only needed once. [More...](classansys_1_1dpf_1_1LibraryHandle.xhtml#details)

`#include <dpf_api_base.h>`

## <a id="pub-methods" name="pub-methods"></a>Public Member Functions

 [LibraryHandle](classansys_1_1dpf_1_1LibraryHandle.xhtml#ace7af23aabdd94273ddce1266a0f402d) (std::string const &amp;key="common", std::string const &amp;shared\_object\_root\_name="DataProcessingCore", LoadType load\_type=[LoadType::try\_load](namespaceansys_1_1dpf.xhtml#ac4f1380f00170887891b5cf54d8c94b3a6d450e9598ea0dffeaff74fbcccb116f), std::string const &amp;dpf\_client\_api="DPFClientAPI")  [LibraryHandle](classansys_1_1dpf_1_1LibraryHandle.xhtml#a6015d31697c46deb75d7274fb5b0cf74) ([Context](classansys_1_1dpf_1_1Context.xhtml) const &amp;context, std::string const &amp;key="common", std::string const &amp;shared\_object\_root\_name="DataProcessingCore", LoadType load\_type=[LoadType::try\_load](namespaceansys_1_1dpf.xhtml#ac4f1380f00170887891b5cf54d8c94b3a6d450e9598ea0dffeaff74fbcccb116f), std::string const &amp;dpf\_client\_api="DPFClientAPI")  [LibraryHandle](classansys_1_1dpf_1_1LibraryHandle.xhtml#a22f10026b439d4e05a8d4917ca286961) (std::string const &amp;path\_to\_shared\_object, [Context](classansys_1_1dpf_1_1Context.xhtml) const &amp;context, std::string const &amp;key="common", std::string const &amp;shared\_object\_root\_name="DataProcessingCore", LoadType load\_type=[LoadType::try\_load](namespaceansys_1_1dpf.xhtml#ac4f1380f00170887891b5cf54d8c94b3a6d450e9598ea0dffeaff74fbcccb116f), std::string const &amp;path\_to\_dpf\_client\_api="", std::string const &amp;dpf\_client\_api="DPFClientAPI")  [LibraryHandle](classansys_1_1dpf_1_1LibraryHandle.xhtml#a0651cd01e74e2cb90f320435bc7fc87a) (std::string const &amp;key, std::string const &amp;shared\_object\_root\_name, [ApiType](namespaceansys_1_1dpf.xhtml#a318ab16f856ec8d2ef6e13af94a6dc56) api\_type, [LoadType](namespaceansys_1_1dpf.xhtml#ac4f1380f00170887891b5cf54d8c94b3) load\_type=[LoadType::try\_load](namespaceansys_1_1dpf.xhtml#ac4f1380f00170887891b5cf54d8c94b3a6d450e9598ea0dffeaff74fbcccb116f), std::string const &amp;dpf\_client\_api="DPFClientAPI") <a id="af1ab8962e664dd53b7c4b47988443e7e" name="af1ab8962e664dd53b7c4b47988443e7e"></a> **LibraryHandle** (so::API \*api) <a id="a385df64ee05cc735acdbd0d519f47fd0" name="a385df64ee05cc735acdbd0d519f47fd0"></a> **LibraryHandle** (const [LibraryHandle](classansys_1_1dpf_1_1LibraryHandle.xhtml) &amp;)=delete <a id="a761736a0e5edc45659fb39edf4f25a4f" name="a761736a0e5edc45659fb39edf4f25a4f"></a> **LibraryHandle** ([LibraryHandle](classansys_1_1dpf_1_1LibraryHandle.xhtml) &amp;&amp;)=delete <a id="a960d04a287464cd7e4337c501b07e55f" name="a960d04a287464cd7e4337c501b07e55f"></a>[LibraryHandle](classansys_1_1dpf_1_1LibraryHandle.xhtml) &amp; **operator=** (const [LibraryHandle](classansys_1_1dpf_1_1LibraryHandle.xhtml) &amp;)=delete <a id="ae6b4015fd07463703a5a61a8d99b19f8" name="ae6b4015fd07463703a5a61a8d99b19f8"></a>[LibraryHandle](classansys_1_1dpf_1_1LibraryHandle.xhtml) &amp; **operator=** ([LibraryHandle](classansys_1_1dpf_1_1LibraryHandle.xhtml) &amp;&amp;)=delete <a id="ad6ccabf051eb035f8c92d2a70915d1b5" name="ad6ccabf051eb035f8c92d2a70915d1b5"></a>so::API const \* **callAPI** () const <a id="a124c4f3f441f173c91e5db5f72697506" name="a124c4f3f441f173c91e5db5f72697506"></a>[ansys::dpf::DpfError](classansys_1_1dpf_1_1DpfError.xhtml) const &amp; **error** () const <a id="details" name="details"></a>## Detailed Description

Provides an access to use DPF HGP API. The instance of [LibraryHandle](classansys_1_1dpf_1_1LibraryHandle.xhtml "Provides an access to use DPF HGP API. The instance of LibraryHandle is only needed once.") 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 &amp; Destructor Documentation

<a id="ace7af23aabdd94273ddce1266a0f402d" name="ace7af23aabdd94273ddce1266a0f402d"></a>## [◆ ](#ace7af23aabdd94273ddce1266a0f402d)LibraryHandle() \[1/4\]

 ansys::dpf::LibraryHandle::LibraryHandle  ( std::string const &amp;  *key* = `"common"`,    std::string const &amp;  *shared\_object\_root\_name* = `"DataProcessingCore"`,    [LoadType](namespaceansys_1_1dpf.xhtml#ac4f1380f00170887891b5cf54d8c94b3)  *load\_type* = `<a class="el" href="namespaceansys_1_1dpf.xhtml#ac4f1380f00170887891b5cf54d8c94b3a6d450e9598ea0dffeaff74fbcccb116f">LoadType::try_load</a>`,    std::string const &amp;  *dpf\_client\_api* = `"DPFClientAPI"`   ) 

Must be the first call made to DPF API.

Parameters \[in\]keyKey used to identify the API (e.g. common, remote...). \[in\]shared\_object\_root\_nameLibrary 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\_typeEnum that provides settings at API loading step. 



<a id="a6015d31697c46deb75d7274fb5b0cf74" name="a6015d31697c46deb75d7274fb5b0cf74"></a>## [◆ ](#a6015d31697c46deb75d7274fb5b0cf74)LibraryHandle() \[2/4\]

 ansys::dpf::LibraryHandle::LibraryHandle  ( [Context](classansys_1_1dpf_1_1Context.xhtml) const &amp;  *context*,    std::string const &amp;  *key* = `"common"`,    std::string const &amp;  *shared\_object\_root\_name* = `"DataProcessingCore"`,    [LoadType](namespaceansys_1_1dpf.xhtml#ac4f1380f00170887891b5cf54d8c94b3)  *load\_type* = `<a class="el" href="namespaceansys_1_1dpf.xhtml#ac4f1380f00170887891b5cf54d8c94b3a6d450e9598ea0dffeaff74fbcccb116f">LoadType::try_load</a>`,    std::string const &amp;  *dpf\_client\_api* = `"DPFClientAPI"`   ) 

Must be the first call made to DPF API. Using a [Context](classansys_1_1dpf_1_1Context.xhtml) that defines specific settings.

Parameters \[in\]context[Context](classansys_1_1dpf_1_1Context.xhtml) object that defines settings to load the DPF APIs. \[in\]keyKey used to identify the API (e.g. common, remote...). \[in\]shared\_object\_root\_nameLibrary 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\_typeEnum that provides settings at API loading step. 



<a id="a22f10026b439d4e05a8d4917ca286961" name="a22f10026b439d4e05a8d4917ca286961"></a>## [◆ ](#a22f10026b439d4e05a8d4917ca286961)LibraryHandle() \[3/4\]

 ansys::dpf::LibraryHandle::LibraryHandle  ( std::string const &amp;  *path\_to\_shared\_object*,    [Context](classansys_1_1dpf_1_1Context.xhtml) const &amp;  *context*,    std::string const &amp;  *key* = `"common"`,    std::string const &amp;  *shared\_object\_root\_name* = `"DataProcessingCore"`,    [LoadType](namespaceansys_1_1dpf.xhtml#ac4f1380f00170887891b5cf54d8c94b3)  *load\_type* = `<a class="el" href="namespaceansys_1_1dpf.xhtml#ac4f1380f00170887891b5cf54d8c94b3a6d450e9598ea0dffeaff74fbcccb116f">LoadType::try_load</a>`,    std::string const &amp;  *path\_to\_dpf\_client\_api* = `""`,    std::string const &amp;  *dpf\_client\_api* = `"DPFClientAPI"`   ) 

Must be the first call made to DPF API. Using a [Context](classansys_1_1dpf_1_1Context.xhtml) that defines specific settings.

Parameters \[in\]path\_to\_shared\_objectpath to DataProcessingCore.dll or libDataProcessingCore.so. \[in\]context[Context](classansys_1_1dpf_1_1Context.xhtml) object that defines settings to load the DPF APIs. \[in\]keyKey used to identify the API (e.g. common, remote...). \[in\]shared\_object\_root\_nameLibrary 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\_typeEnum that provides settings at API loading step. \[in\]path\_to\_dpf\_client\_apipath to DPFClientAPI.dll or libDPFClientAPI.so, takes path\_to\_shared\_object by default. 



<a id="a0651cd01e74e2cb90f320435bc7fc87a" name="a0651cd01e74e2cb90f320435bc7fc87a"></a>## [◆ ](#a0651cd01e74e2cb90f320435bc7fc87a)LibraryHandle() \[4/4\]

 ansys::dpf::LibraryHandle::LibraryHandle  ( std::string const &amp;  *key*,    std::string const &amp;  *shared\_object\_root\_name*,    [ApiType](namespaceansys_1_1dpf.xhtml#a318ab16f856ec8d2ef6e13af94a6dc56)  *api\_type*,    [LoadType](namespaceansys_1_1dpf.xhtml#ac4f1380f00170887891b5cf54d8c94b3)  *load\_type* = `<a class="el" href="namespaceansys_1_1dpf.xhtml#ac4f1380f00170887891b5cf54d8c94b3a6d450e9598ea0dffeaff74fbcccb116f">LoadType::try_load</a>`,    std::string const &amp;  *dpf\_client\_api* = `"DPFClientAPI"`   ) 

**[Deprecated:](deprecated.xhtml#_deprecated000001)**This call is deprecated. usage is not maintained.