ansys::dpf::DataSources Class Reference
Last update: 16.07.2025#include <dpf_api.h>

Public Member Functions | |
| DataSources (Client const *const client) | |
| DataSources (DataSources const &) | |
| DataSources (DataSources &&) | |
| DataSources (std::string const &result_file_path, std::string const &key) | |
| DataSources (std::string const &result_file_path, std::string const &key, Client const *const client) | |
| DataSources (std::string const &result_file_path) | |
| DataSources (std::string const &result_file_path, Client const *const client) | |
| DataSources (int id, Client const *const client) | |
| DataSources & | operator= (DataSources const &) |
| DataSources & | operator= (DataSources &&) |
| void | addResultFile (std::string const &file_path, std::string const &key) |
| void | addResultFileWString (std::wstring const &file_path) |
| void | addResultFile (std::string const &file_path) |
| void | addDomainResultFile (std::string const &file_path, std::string const &key, dp_int domain_id) |
| void | addFile (std::string const &file_path, std::string const &key) |
| void | addFile (std::string const &file_path) |
| void | addFile (std::string const &file_path, std::string const &key, std::string const &result_key) |
| void | addDomainFile (std::string const &file_path, std::string const &key, dp_int domain_id) |
| void | addUpStream (DataSources &ds) |
| void | addUpStream (DataSources &ds, std::string const &result_key) |
| std::string | resultKey () const |
| std::vector< std::string > | filePaths (std::string const &key) const |
| std::vector< std::string > | resultFilePaths () const |
| std::vector< std::string > | keys () const |
| int | numPaths () const |
| std::string | pathAtKeyByIndex (std::string const &key, dp_index index) const |
| std::pair< std::string, std::string > | pathAndKeyByIndex (int index) |
| LabelSpace | identifierbyIndex (int index) |
| DataSources | deep_copy (ansys::dpf::Client const *const client=nullptr) const |
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 DataSources | emptyDataSources () |
Detailed Description
Container of files on which the analysis results can be found.
Constructor & Destructor Documentation
◆ DataSources() [1/6]
| ansys::dpf::DataSources::DataSources | ( | Client const *const | client | ) |
Create a file container on a server.
- Parameters
-
[in] client Client instance designating the IP, port and protocol to use.
◆ DataSources() [2/6]
| ansys::dpf::DataSources::DataSources | ( | std::string const & | result_file_path, |
| std::string const & | key | ||
| ) |
Create a file container with given file and key.
- Parameters
-
[in] result_file_path Result file with which to create data source container. [in] key Key describing type of file.
◆ DataSources() [3/6]
| ansys::dpf::DataSources::DataSources | ( | std::string const & | result_file_path, |
| std::string const & | key, | ||
| Client const *const | client | ||
| ) |
◆ DataSources() [4/6]
| ansys::dpf::DataSources::DataSources | ( | std::string const & | result_file_path | ) |
Create a file container with given file.
- Parameters
-
[in] result_file_path Result file with which to create data source container.
◆ DataSources() [5/6]
| ansys::dpf::DataSources::DataSources | ( | std::string const & | result_file_path, |
| Client const *const | client | ||
| ) |
Create a file container with given file on a server.
- Parameters
-
[in] result_file_path Result file with which to create data source container.
◆ DataSources() [6/6]
| ansys::dpf::DataSources::DataSources | ( | int | id, |
| Client const *const | client | ||
| ) |
Retrieve an existing instance of DataSources on a server.
- Parameters
-
[in] id Id of the DataSources object on the server's database. [in] client Client instance designating the IP, port and protocol to use.
Member Function Documentation
◆ addDomainFile()
| void ansys::dpf::DataSources::addDomainFile | ( | std::string const & | file_path, |
| std::string const & | key, | ||
| dp_int | domain_id | ||
| ) |
Add domain file with key and domain id to data sources.
- Parameters
-
[in] file_path File to use with data source container. [in] key Key describing type of file. [in] domain_id Domain id of file.
◆ addDomainResultFile()
| void ansys::dpf::DataSources::addDomainResultFile | ( | std::string const & | file_path, |
| std::string const & | key, | ||
| dp_int | domain_id | ||
| ) |
Define data source result file with key and domain.
- Parameters
-
[in] file_path Result file to use with data source container. [in] key Key describing type of file. [in] domain_id Domain id of file.
◆ addFile() [1/3]
| void ansys::dpf::DataSources::addFile | ( | std::string const & | file_path | ) |
Add secondary, non-result, file to data sources.
- Parameters
-
[in] file_path File to use with data source container.
◆ addFile() [2/3]
| void ansys::dpf::DataSources::addFile | ( | std::string const & | file_path, |
| std::string const & | key | ||
| ) |
Add secondary, non-result, file with key to data sources.
- Parameters
-
[in] file_path File to use with data source container. [in] key Key describing type of file.
- Examples
- DataApis.cpp.
◆ addFile() [3/3]
| void ansys::dpf::DataSources::addFile | ( | std::string const & | file_path, |
| std::string const & | key, | ||
| std::string const & | result_key | ||
| ) |
Add secondary, non-result, file with key and result key to data sources.
- Parameters
-
[in] file_path File to use with data source container. [in] key Key describing type of file. [in] result_key Result key for file.
◆ addResultFile() [1/2]
| void ansys::dpf::DataSources::addResultFile | ( | std::string const & | file_path | ) |
Define result for data sources.
- Parameters
-
[in] file_path Result file to use with data source container.
◆ addResultFile() [2/2]
| void ansys::dpf::DataSources::addResultFile | ( | std::string const & | file_path, |
| std::string const & | key | ||
| ) |
Define result file with key for data sources.
- Parameters
-
[in] file_path Result file to use with data source container. [in] key Key describing type of file.
◆ addResultFileWString()
| void ansys::dpf::DataSources::addResultFileWString | ( | std::wstring const & | file_path | ) |
Define result for data sources.
- Parameters
-
[in] file_path Result file to use with data source container.
◆ addUpStream() [1/2]
| void ansys::dpf::DataSources::addUpStream | ( | DataSources & | ds | ) |
Add up stream to data sources.
- Parameters
-
[in] ds Upstream data sources.
◆ addUpStream() [2/2]
| void ansys::dpf::DataSources::addUpStream | ( | DataSources & | ds, |
| std::string const & | result_key | ||
| ) |
Add up stream with result key to data sources.
- Parameters
-
[in] ds Upstream data sources. [in] result_key Result key for upstream source.
◆ deep_copy()
| DataSources ansys::dpf::DataSources::deep_copy | ( | ansys::dpf::Client const *const | client = nullptr | ) | const |
Create a new DataSources on a server by copying all the data of this DataSources.
- Parameters
-
[in] client Client instance designating the IP, port and protocol to use.
◆ emptyDataSources()
|
static |
Create an empty data sources.
- Returns
- Empty DataSources.
◆ filePaths()
| std::vector< std::string > ansys::dpf::DataSources::filePaths | ( | std::string const & | key | ) | const |
- Returns
- Vector of secondary files given by key.
- Parameters
-
[in] key Key describing file type.
◆ identifierbyIndex()
| LabelSpace ansys::dpf::DataSources::identifierbyIndex | ( | int | index | ) |
- Returns
- LabelSpace or identifier of a path for a given index in data sources.
◆ keys()
| std::vector< std::string > ansys::dpf::DataSources::keys | ( | ) | const |
- Returns
- Vector of keys in data sources.
◆ numPaths()
| int ansys::dpf::DataSources::numPaths | ( | ) | const |
- Returns
- Size or Num file path in data sources.
- Examples
- CompleteRST.cpp.
◆ pathAndKeyByIndex()
| std::pair< std::string, std::string > ansys::dpf::DataSources::pathAndKeyByIndex | ( | int | index | ) |
- Returns
- File path and its key for a given index in data sources.
◆ pathAtKeyByIndex()
| std::string ansys::dpf::DataSources::pathAtKeyByIndex | ( | std::string const & | key, |
| dp_index | index | ||
| ) | const |
- Returns
- Path at given key and given index in data sources.
◆ resultFilePaths()
| std::vector< std::string > ansys::dpf::DataSources::resultFilePaths | ( | ) | const |
- Returns
- Vector of result files in data sources.
◆ resultKey()
| std::string ansys::dpf::DataSources::resultKey | ( | ) | const |
- Returns
- Result key of data sources.
Public Member Functions inherited from