Skip to main content

DPF C++ Client Library 2025 R1

ansys::dpf::CustomTypeFieldsContainer Class Reference

Last update: 16.07.2025

#include <dpf_api.h>

Inherits ansys::dpf::CollectionBase.

Public Member Functions

 CustomTypeFieldsContainer (CustomTypeFieldsContainer const &)
 
 CustomTypeFieldsContainer (CustomTypeFieldsContainer &&) noexcept
 
 CustomTypeFieldsContainer (std::vector< std::string > const &labels)
 
CustomTypeFieldsContaineroperator= (CustomTypeFieldsContainer const &)
 
CustomTypeFieldsContaineroperator= (CustomTypeFieldsContainer &&) noexcept
 
CustomTypeField operator[] (dp_int index)
 
CustomTypeField at (dp_index index)
 
const CustomTypeField at (dp_index index) const
 
void update (CustomTypeField &f, dp_index index)
 
void add (LabelSpace const &labels, CustomTypeField const &f)
 
dp_int getSizeFor (LabelSpace const &label_space) const
 
std::vector< CustomTypeFieldgetCustomTypeFields (LabelSpace const &label_space) const
 
CustomTypeField getCustomTypeField (LabelSpace const &label_space) const
 
std::vector< int > getCustomTypeFieldsIndices (LabelSpace const &lab_space) const
 
CustomTypeFieldsContainer createSubCustomTypeFieldsContainer (LabelSpace const &lab_space) const
 create a CustomTypeFieldsContainer with all the CustomTypeFields corresponding to the label space in input
 

Static Public Member Functions

static CustomTypeFieldsContainer emptyCustomTypeFieldsContainer ()
 

Detailed Description

Contains a group of custom type fields. The CustomTypeFieldsContainer is designed as a set of custom type fields ordered through labels and ids. Labels identify how the fields are filtered.

See also
CustomTypeField
Using collections and labels

Constructor & Destructor Documentation

◆ CustomTypeFieldsContainer()

ansys::dpf::CustomTypeFieldsContainer::CustomTypeFieldsContainer ( std::vector< std::string > const &  labels)

Create container for a group of CustomTypeFields with the given labels.

Parameters
[in]labelsLabels for group of CustomTypeFields.

Member Function Documentation

◆ add()

void ansys::dpf::CustomTypeFieldsContainer::add ( LabelSpace const &  labels,
CustomTypeField const &  f 
)

Add CustomTypeField with given label space.

Parameters
[in]labelsLabel space for CustomTypeField.
[in]fCustomTypeField to add.

◆ at() [1/2]

CustomTypeField ansys::dpf::CustomTypeFieldsContainer::at ( dp_index  index)
Returns
CustomTypeFields for given index.
Parameters
[in]indexIndex of CustomTypeField to get.

◆ at() [2/2]

const CustomTypeField ansys::dpf::CustomTypeFieldsContainer::at ( dp_index  index) const
Returns
CustomTypeFields for given index.
Parameters
[in]indexIndex of CustomTypeField to get.

◆ emptyCustomTypeFieldsContainer()

static CustomTypeFieldsContainer ansys::dpf::CustomTypeFieldsContainer::emptyCustomTypeFieldsContainer ( )
static

Create an empty container.

Returns
Empty container.

◆ getCustomTypeField()

CustomTypeField ansys::dpf::CustomTypeFieldsContainer::getCustomTypeField ( LabelSpace const &  label_space) const
Returns
First CustomTypeField for given label space.
Parameters
[in]label_spaceLabel space for which to get CustomTypeField.

◆ getCustomTypeFields()

std::vector< CustomTypeField > ansys::dpf::CustomTypeFieldsContainer::getCustomTypeFields ( LabelSpace const &  label_space) const
Returns
Vector of CustomTypeFields for given label space.
Parameters
[in]label_spaceLabel space for which to get CustomTypeFields.

◆ getSizeFor()

dp_int ansys::dpf::CustomTypeFieldsContainer::getSizeFor ( LabelSpace const &  label_space) const
Returns
Number of CustomTypeFields for given label space.
Parameters
[in]label_spaceLabel space for which to get number of entities.

◆ operator[]()

CustomTypeField ansys::dpf::CustomTypeFieldsContainer::operator[] ( dp_int  index)
Returns
CustomTypeField for given index.
Parameters
[in]indexIndex of CustomTypeFields within container.

◆ update()

void ansys::dpf::CustomTypeFieldsContainer::update ( CustomTypeField f,
dp_index  index 
)

Update a CustomTypeField at index.

Parameters
[in]fNew CustomTypeField.
[in]indexIndex of CustomTypeField to update.

Connect with Ansys