ansys::dpf::Collection< DataT > Class Template Reference
Last update: 16.07.2025#include <dpf_api.h>
Inherits ansys::dpf::CollectionBase.
Public Member Functions | |
| Collection (Collection< DataT > const &) | |
| Collection (Collection< DataT > &&) noexcept | |
| Collection (std::vector< std::string > const &labels) | |
| Collection (Client const *const client) | |
| Collection (Client const *const client, std::vector< std::string > const &labels) | |
| Collection (int id, Client const *const client) | |
| Collection & | operator= (Collection< DataT > const &) |
| Collection & | operator= (Collection< DataT > &&) noexcept |
| DataT | operator[] (dp_int index) |
| DataT | at (dp_index index) |
| const DataT | at (dp_index index) const |
| void | update (DataT &f, dp_index index) |
| void | add (LabelSpace const &labels, DataT const &f, bool can_replace=true) |
| std::vector< DataT > | getEntries (LabelSpace const &label_space) const |
| DataT | getEntry (LabelSpace const &label_space) const |
| std::vector< dp_index > | getEntriesIndices (LabelSpace const &lab_space) const |
| Collection< DataT > | createSubCollection (LabelSpace const &lab_space) const |
| create a Collection with all the entries corresponding to the label space in input | |
Static Public Member Functions | |
| static Collection< DataT > | emptyCollection () |
Detailed Description
template<typename DataT>
class ansys::dpf::Collection< DataT >
class ansys::dpf::Collection< DataT >
Contains a group of entries of same type. The AnyCollection is designed as a set of entries ordered through labels and ids. Labels identify how the entries are filtered.
- See also
- Any
Constructor & Destructor Documentation
◆ Collection() [1/4]
template<typename DataT >
| ansys::dpf::Collection< DataT >::Collection | ( | std::vector< std::string > const & | labels | ) |
Create container for a group of entries with the given labels.
- Parameters
-
[in] labels Labels for group of entries.
◆ Collection() [2/4]
template<typename DataT >
| ansys::dpf::Collection< DataT >::Collection | ( | Client const *const | client | ) |
Create a new collection on a server.
- Parameters
-
[in] client Client instance designating the IP, port and protocol to use.
◆ Collection() [3/4]
template<typename DataT >
| ansys::dpf::Collection< DataT >::Collection | ( | Client const *const | client, |
| std::vector< std::string > const & | labels | ||
| ) |
Create a collection with the given labels on a server.
- Parameters
-
[in] client Client instance designating the IP, port and protocol to use. [in] labels Labels for meshes.
◆ Collection() [4/4]
template<typename DataT >
| ansys::dpf::Collection< DataT >::Collection | ( | int | id, |
| Client const *const | client | ||
| ) |
Retrieve an existing instance of Collection on a server.
- Parameters
-
[in] id Id of the Collection object on the server's database. [in] client Client instance designating the IP, port and protocol to use.
Member Function Documentation
◆ add()
template<typename DataT >
| void ansys::dpf::Collection< DataT >::add | ( | LabelSpace const & | labels, |
| DataT const & | f, | ||
| bool | can_replace = true |
||
| ) |
◆ at() [1/2]
template<typename DataT >
| DataT ansys::dpf::Collection< DataT >::at | ( | dp_index | index | ) |
- Returns
- DataT for given index.
- Parameters
-
[in] index Index of Any to get.
◆ at() [2/2]
template<typename DataT >
| const DataT ansys::dpf::Collection< DataT >::at | ( | dp_index | index | ) | const |
- Returns
- DataT for given index.
- Parameters
-
[in] index Index of Any to get.
◆ emptyCollection()
template<typename DataT >
|
static |
Create an empty container.
- Returns
- Empty container.
◆ getEntries()
template<typename DataT >
| std::vector< DataT > ansys::dpf::Collection< DataT >::getEntries | ( | LabelSpace const & | label_space | ) | const |
- Returns
- Vector of entries for given label space.
- Parameters
-
[in] label_space Label space for which to get entries.
◆ getEntry()
template<typename DataT >
| DataT ansys::dpf::Collection< DataT >::getEntry | ( | LabelSpace const & | label_space | ) | const |
◆ operator[]()
template<typename DataT >
| DataT ansys::dpf::Collection< DataT >::operator[] | ( | dp_int | index | ) |
- Returns
- Any for given index.
- Parameters
-
[in] index Index of entries within container.
◆ update()
template<typename DataT >
| void ansys::dpf::Collection< DataT >::update | ( | DataT & | f, |
| dp_index | index | ||
| ) |