ansys::dpf::LabelSpace Class Reference
Last update: 16.07.2025#include <dpf_api.h>
Inheritance diagram for ansys::dpf::LabelSpace:

Public Member Functions | |
| LabelSpace (Client const *const client) | |
| LabelSpace (std::map< Label, dp_int > const &rhs, Client const *const client) | |
| LabelSpace (std::initializer_list< std::pair< const Label, int > > init, Client const *const client) | |
| LabelSpace (std::map< Label, dp_int > const &rhs) | |
| LabelSpace (std::initializer_list< std::pair< const Label, int > > init) | |
| LabelSpace (LabelSpace const &) | |
| LabelSpace (LabelSpace &&) | |
| LabelSpace & | operator= (LabelSpace const &) |
| LabelSpace & | operator= (LabelSpace &&) |
| void | add (Label const &label, dp_int value) |
| void | set (Label const &label, dp_int value) |
| void | erase (Label const &label) |
| dp_int | size () const |
| bool | has (Label const &label) const |
| dp_int | at (Label const &label) const |
| std::string | labelsName (dp_index index) const |
| LabelSpace & | setTime (dp_index i) |
| LabelSpace & | setDomain (dp_index i) |
| LabelSpace & | setComplex (dp_index i) |
| LabelSpace & | addAnyTime () |
| LabelSpace & | addAnyDomain () |
| LabelSpace | deep_copy (ansys::dpf::Client const *const client=nullptr) const |
| void | mergeWith (ansys::dpf::LabelSpace const other) |
Public Member Functions inherited from ansys::dpf::DpfTypes | |
| virtual bool | empty () 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 LabelSpace | emptyLabelSpace () |
Detailed Description
Defines an indexation for fields container.
- See also
- Using collections and labels
- Examples
- DataApis.cpp, and DataExport.cpp.
Constructor & Destructor Documentation
◆ LabelSpace() [1/5]
| ansys::dpf::LabelSpace::LabelSpace | ( | Client const *const | client | ) |
Create a new LabelSpace for a given client.
- Parameters
-
[in] client Client instance designating the IP, port and protocol to use.
◆ LabelSpace() [2/5]
| ansys::dpf::LabelSpace::LabelSpace | ( | std::map< Label, dp_int > const & | rhs, |
| Client const *const | client | ||
| ) |
Consturct new LabelSpace from labels and values.
- Parameters
-
[in] rhs labels and values with which to construct space. [in] client Client instance designating the IP, port and protocol to use.
◆ LabelSpace() [3/5]
| ansys::dpf::LabelSpace::LabelSpace | ( | std::initializer_list< std::pair< const Label, int > > | init, |
| Client const *const | client | ||
| ) |
Construct new LabelSpace from pairs of labels and values.
- Parameters
-
[in] init List of label/value pairs. [in] client Client instance designating the IP, port and protocol to use.
◆ LabelSpace() [4/5]
Consturct new LabelSpace from labels and values.
- Parameters
-
[in] rhs labels and values with which to construct space.
◆ LabelSpace() [5/5]
| ansys::dpf::LabelSpace::LabelSpace | ( | std::initializer_list< std::pair< const Label, int > > | init | ) |
Construct new LabelSpace from pairs of labels and values.
- Parameters
-
[in] init List of label/value pairs.
Member Function Documentation
◆ add()
Add a label with value. If label already exists, nothing happens.
- Parameters
-
[in] label Label to add to LabelSpace. [in] value Value of label.
◆ addAnyDomain()
| LabelSpace & ansys::dpf::LabelSpace::addAnyDomain | ( | ) |
◆ addAnyTime()
| LabelSpace & ansys::dpf::LabelSpace::addAnyTime | ( | ) |
◆ at()
- Returns
- Value of label within space.
- Parameters
-
[in] label Label of which to get value.
◆ deep_copy()
| LabelSpace ansys::dpf::LabelSpace::deep_copy | ( | ansys::dpf::Client const *const | client = nullptr | ) | const |
Create a new LabelSpace on a server by copying all the data of this LabelSpace.
- Parameters
-
[in] client Client instance designating the IP, port and protocol to use.
◆ emptyLabelSpace()
|
static |
Create an empty LabelSpace
- Returns
- Empty LabelSpace
◆ erase()
| void ansys::dpf::LabelSpace::erase | ( | Label const & | label | ) |
Removes label from space.
- Parameters
-
[in] label Label to remove.
◆ has()
| bool ansys::dpf::LabelSpace::has | ( | Label const & | label | ) | const |
- Returns
- Indication that label exists within space.
- Parameters
-
[in] label Label of which to check existence.
◆ labelsName()
| std::string ansys::dpf::LabelSpace::labelsName | ( | dp_index | index | ) | const |
- Returns
- name of label at given index.
- Parameters
-
[in] index Index of the wanted label.
◆ mergeWith()
| void ansys::dpf::LabelSpace::mergeWith | ( | ansys::dpf::LabelSpace const | other | ) |
Inserts all labels and ids of other in this.
◆ set()
Set an already existing label to value. If label does not exist it is added.
- Parameters
-
[in] label Label whose value to set. [in] value New value of label.
◆ setComplex()
| LabelSpace & ansys::dpf::LabelSpace::setComplex | ( | dp_index | i | ) |
Set complex label to value.
- Returns
- Reference to labelspace.
- See also
- labels
- Parameters
-
[in] i New value for complex label.
◆ setDomain()
| LabelSpace & ansys::dpf::LabelSpace::setDomain | ( | dp_index | i | ) |
Set domain label to value
- Returns
- Reference to labelspace.
- See also
- labels
- Parameters
-
[in] i New value for domain label.
◆ setTime()
| LabelSpace & ansys::dpf::LabelSpace::setTime | ( | dp_index | i | ) |
Set time label to value.
- Returns
- Reference to labelspace.
- See also
- labels
- Parameters
-
[in] i New value for time label.
◆ size()
| dp_int ansys::dpf::LabelSpace::size | ( | ) | const |
- Returns
- Number of labels in space.
Public Member Functions inherited from