Skip to main content

DPF C++ Client Library 2024 R1

ansys::dpf::CustomTypeFieldsContainer Class Reference

Last update: 16.07.2025

#include <dpf_api.h>

Inheritance diagram for ansys::dpf::CustomTypeFieldsContainer:
ansys::dpf::DpfTypes

Public Member Functions

 CustomTypeFieldsContainer (CustomTypeFieldsContainer const &)
 
 CustomTypeFieldsContainer (CustomTypeFieldsContainer &&)
 
 CustomTypeFieldsContainer (std::vector< std::string > const &labels)
 
CustomTypeFieldsContaineroperator= (CustomTypeFieldsContainer const &)
 
CustomTypeFieldsContaineroperator= (CustomTypeFieldsContainer &&)
 
CustomTypeField operator[] (dp_int index)
 
dp_int size () const
 
CustomTypeField at (dp_index index)
 
const CustomTypeField at (dp_index index) const
 
void update (CustomTypeField &f, dp_index index)
 
void reserve (dp_int size)
 
void resize (dp_int size)
 
void addLabel (std::string const &label)
 
void addLabel (std::string const &label, dp_id default_value)
 
void addLabels (std::vector< std::string > const &labels)
 
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< std::string > labels () const
 
LabelSpace getLabelSpace (dp_index index) const
 
bool hasLabel (std::string const &label) const
 @ return Indication that given label exists within container. More...
 
Scoping labelScoping (std::string const &label) const
 
CustomTypeFieldsContainer createSubCustomTypeFieldsContainer (LabelSpace const &lab_space) const
 create a CustomTypeFieldsContainer with all the CustomTypeFields corresponding to the label space in input
 
std::string name () const
 
void setName (std::string name)
 
dp_id id () const
 @ return Id of container.
 
void setId (dp_id id)
 
- Public Member Functions inherited from ansys::dpf::DpfTypes
virtual bool empty () const
 
virtual bool hasInternalObject () const
 
virtual std::string describe () const
 
so::API const * callAPI () const
 
bool isOnCommonAPI () const
 
bool getClient (Client &client) const
 
bool hasBeenMovedLocally () const
 
bool isSameObject (DpfTypes const &rhs) const
 

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.

◆ addLabel() [1/2]

void ansys::dpf::CustomTypeFieldsContainer::addLabel ( std::string const &  label)

Add label.

Parameters
[in]labelNew group label.

◆ addLabel() [2/2]

void ansys::dpf::CustomTypeFieldsContainer::addLabel ( std::string const &  label,
dp_id  default_value 
)

Add label with default value for all already entered entities in the container.

Parameters
[in]labelNew label.
[in]default_valueDefault value for label.

◆ addLabels()

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

Add labels.

Parameters
[in]labelsNew labels.

◆ 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.

◆ getLabelSpace()

LabelSpace ansys::dpf::CustomTypeFieldsContainer::getLabelSpace ( dp_index  index) const
Returns
LabelSpace for given index in container.
Parameters
[in]indexIndex of the CustomTypeField in container for which to get label space.

◆ 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.

◆ hasLabel()

bool ansys::dpf::CustomTypeFieldsContainer::hasLabel ( std::string const &  label) const

@ return Indication that given label exists within container.

Parameters
[in]labelLabel for which to check existence.

◆ labels()

std::vector< std::string > ansys::dpf::CustomTypeFieldsContainer::labels ( ) const
Returns
Vector of labels.

◆ labelScoping()

Scoping ansys::dpf::CustomTypeFieldsContainer::labelScoping ( std::string const &  label) const
Returns
a scoping of the available ids in the container for a given label
Parameters
[in]labelName of label.

◆ name()

std::string ansys::dpf::CustomTypeFieldsContainer::name ( ) const
Returns
Name of CustomTypeFields container.

◆ operator[]()

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

◆ reserve()

void ansys::dpf::CustomTypeFieldsContainer::reserve ( dp_int  size)

Reserve space for given number of CustomTypeFields.

Parameters
[in]sizeExpected number of CustomTypeFields.

◆ resize()

void ansys::dpf::CustomTypeFieldsContainer::resize ( dp_int  size)

Resize CustomTypeFieldsCotnainer to given number of CustomTypeFields.

Parameters
[in]sizeNumber of CustomTypeFields in container.

◆ setId()

void ansys::dpf::CustomTypeFieldsContainer::setId ( dp_id  id)

Set Id of container.

Parameters
[in]idId for container.

◆ setName()

void ansys::dpf::CustomTypeFieldsContainer::setName ( std::string  name)

Set name of container.

Parameters
[in]nameName of container.

◆ size()

dp_int ansys::dpf::CustomTypeFieldsContainer::size ( ) const
Returns
Number of CustomTypeFields in 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