Skip to main content

DPF C++ client library 2023 R2

ansys::dpf::DpfVector< T > Class Template Reference

Last update: 10.07.2023

Represents a modifiable vector of data and manages its memory. More...

#include <dpf_api_base.h>

Public Member Functions

 DpfVector (DpfTypes const &for_object)
 
 DpfVector (LibraryHandle const &library_handle)
 
 DpfVector (DpfVector const &)=delete
 
 DpfVector (DpfVector &&)
 
DpfVectoroperator= (DpfVector const &)=delete
 
DpfVectoroperator= (DpfVector &&)
 
T & operator[] (dp_index idx)
 
operator[] (dp_index idx) const
 
T const *const data () const
 
T *const data ()
 
dp_int size () const
 
bool defined () const
 
void commit () const
 
void copy (std::vector< T > &to_fill) const
 
std::vector< T > copy () const
 

Detailed Description

template<typename T>
class ansys::dpf::DpfVector< T >

Represents a modifiable vector of data and manages its memory.

If the DpfVector is returned by a local entity, then it's a direct pointer to its data else if the DpfVector 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 is destructed.

Member Function Documentation

◆ commit()

template<typename T >
void ansys::dpf::DpfVector< T >::commit

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

◆ defined()

template<typename T >
bool ansys::dpf::DpfVector< T >::defined

Return an true information if the DpfVector object has data set.

◆ size()

template<typename T >
dp_int ansys::dpf::DpfVector< T >::size

Return the size of the data contained in the DpfVector object.