    

 ## On this page

  

 

 # ansys::dpf::DpfVector&lt; T &gt; Class Template Reference

 Last update: 16.07.2025 

Represents a modifiable vector of data and manages its memory. [More...](classansys_1_1dpf_1_1DpfVector.xhtml#details)

`#include <dpf_api_base.h>`

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

<a id="a221a18e95bb54fd6ca069b2a2a0f75e6" name="a221a18e95bb54fd6ca069b2a2a0f75e6"></a> **DpfVector** ([DpfTypes](classansys_1_1dpf_1_1DpfTypes.xhtml) const &amp;for\_object) <a id="ad6c298a240c1d771cd35863b08221f0b" name="ad6c298a240c1d771cd35863b08221f0b"></a> **DpfVector** ([LibraryHandle](classansys_1_1dpf_1_1LibraryHandle.xhtml) const &amp;library\_handle) <a id="a26e77263ac8e72cc00383d849793c67c" name="a26e77263ac8e72cc00383d849793c67c"></a> **DpfVector** ([DpfVector](classansys_1_1dpf_1_1DpfVector.xhtml) const &amp;)=delete <a id="a861713b25289232791ac9fa25304cbbd" name="a861713b25289232791ac9fa25304cbbd"></a> **DpfVector** ([DpfVector](classansys_1_1dpf_1_1DpfVector.xhtml) &amp;&amp;) <a id="a35d79bd0d68a8d8a00ca457ec485b528" name="a35d79bd0d68a8d8a00ca457ec485b528"></a>[DpfVector](classansys_1_1dpf_1_1DpfVector.xhtml) &amp; **operator=** ([DpfVector](classansys_1_1dpf_1_1DpfVector.xhtml) const &amp;)=delete <a id="a92dc2ad033a53f618b45600dc4bd091a" name="a92dc2ad033a53f618b45600dc4bd091a"></a>[DpfVector](classansys_1_1dpf_1_1DpfVector.xhtml) &amp; **operator=** ([DpfVector](classansys_1_1dpf_1_1DpfVector.xhtml) &amp;&amp;) <a id="adbf45d7edf6c4d39c867cf3259a4842f" name="adbf45d7edf6c4d39c867cf3259a4842f"></a>T &amp; **operator\[\]** ([dp\_index](namespaceansys_1_1dpf.xhtml#a417548d1b705a9ba54ba9429afe68920) idx) <a id="a415f918ff1a4edc082ef4c5ab50e2276" name="a415f918ff1a4edc082ef4c5ab50e2276"></a>T **operator\[\]** ([dp\_index](namespaceansys_1_1dpf.xhtml#a417548d1b705a9ba54ba9429afe68920) idx) const <a id="a8470a9e4e9231bc076637a4e8a6f8322" name="a8470a9e4e9231bc076637a4e8a6f8322"></a>T const \*const **data** () const <a id="a3549db7551348bf4c845b777a598b22b" name="a3549db7551348bf4c845b777a598b22b"></a>T \*const **data** () [dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0) [size](classansys_1_1dpf_1_1DpfVector.xhtml#acb74f526bb5e61fef09605354966ff16) () const bool [defined](classansys_1_1dpf_1_1DpfVector.xhtml#a0e5b28ad59e3352941d64e760b688f91) () const void [commit](classansys_1_1dpf_1_1DpfVector.xhtml#a2cc9e64a9e622ee766a5766c2faf85d4) () const <a id="a1a9c97d138baa7c3f00f3e1e80d3572d" name="a1a9c97d138baa7c3f00f3e1e80d3572d"></a>void **copy** (std::vector&lt; T &gt; &amp;to\_fill) const <a id="a31354ff982c53a6e327c7210c2878092" name="a31354ff982c53a6e327c7210c2878092"></a>std::vector&lt; T &gt; **copy** () const <a id="details" name="details"></a>## Detailed Description

template&lt;typename T&gt;  
class ansys::dpf::DpfVector&lt; T &gt;

Represents a modifiable vector of data and manages its memory.

If the [DpfVector](classansys_1_1dpf_1_1DpfVector.xhtml "Represents a modifiable vector of data and manages its memory.") is returned by a local entity, then it's a direct pointer to its data else if the [DpfVector](classansys_1_1dpf_1_1DpfVector.xhtml "Represents a modifiable vector of data and manages its memory.") is returned by a remote entity, then it's a copy of the data and the remote data is updated (if necessary) when the [DpfVector](classansys_1_1dpf_1_1DpfVector.xhtml "Represents a modifiable vector of data and manages its memory.") is destructed.



## Member Function Documentation

<a id="a2cc9e64a9e622ee766a5766c2faf85d4" name="a2cc9e64a9e622ee766a5766c2faf85d4"></a>## [◆ ](#a2cc9e64a9e622ee766a5766c2faf85d4)commit()

template&lt;typename T &gt; 

 void [ansys::dpf::DpfVector](classansys_1_1dpf_1_1DpfVector.xhtml)&lt; T &gt;::commit

Update the data in the object (if the vector is pointing on remote data).





<a id="a0e5b28ad59e3352941d64e760b688f91" name="a0e5b28ad59e3352941d64e760b688f91"></a>## [◆ ](#a0e5b28ad59e3352941d64e760b688f91)defined()

template&lt;typename T &gt; 

 bool [ansys::dpf::DpfVector](classansys_1_1dpf_1_1DpfVector.xhtml)&lt; T &gt;::defined

Return an true information if the [DpfVector](classansys_1_1dpf_1_1DpfVector.xhtml "Represents a modifiable vector of data and manages its memory.") object has data set.





<a id="acb74f526bb5e61fef09605354966ff16" name="acb74f526bb5e61fef09605354966ff16"></a>## [◆ ](#acb74f526bb5e61fef09605354966ff16)size()

template&lt;typename T &gt; 

 [dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0) [ansys::dpf::DpfVector](classansys_1_1dpf_1_1DpfVector.xhtml)&lt; T &gt;::size

Return the size of the data contained in the [DpfVector](classansys_1_1dpf_1_1DpfVector.xhtml "Represents a modifiable vector of data and manages its memory.") object.