    

 ## On this page

  

 

 # ansys::dpf::Streams Class Reference

 Last update: 16.07.2025 

Defines an open, ready-to-use, data sources. [More...](classansys_1_1dpf_1_1Streams.xhtml#details)

`#include <dpf_api.h>`

Inheritance diagram for ansys::dpf::Streams:

 ![](/sites/default/files/migrate-content/dpf_cpp_client_library_2025_r2_new_link_to_op_1/classansys_1_1dpf_1_1Streams.png)



## <a id="pub-methods" name="pub-methods"></a>Public Member Functions

 [Streams](classansys_1_1dpf_1_1Streams.xhtml#a2fb94c03c22c93198568b298397a39f0) ([DataSources](classansys_1_1dpf_1_1DataSources.xhtml) const &amp;dataSources) <a id="a2d3487cb883138358d6e0cc76bb71974" name="a2d3487cb883138358d6e0cc76bb71974"></a> **Streams** ([Streams](classansys_1_1dpf_1_1Streams.xhtml) const &amp;) <a id="a4e584cc75bc6d32cd768005451643ef9" name="a4e584cc75bc6d32cd768005451643ef9"></a> **Streams** ([Streams](classansys_1_1dpf_1_1Streams.xhtml) &amp;&amp;) noexcept  [Streams](classansys_1_1dpf_1_1Streams.xhtml#a24c07bb8c759f0a8b2cacd44af9ac929) (int id, [Client](classansys_1_1dpf_1_1Client.xhtml) const \*const client) <a id="a6f88f1efa7e63cf70d4998621697d182" name="a6f88f1efa7e63cf70d4998621697d182"></a>[Streams](classansys_1_1dpf_1_1Streams.xhtml) &amp; **operator=** ([Streams](classansys_1_1dpf_1_1Streams.xhtml) const &amp;) <a id="ac8a81b6a8f8ffbf11c3d86cbe54f6c78" name="ac8a81b6a8f8ffbf11c3d86cbe54f6c78"></a>[Streams](classansys_1_1dpf_1_1Streams.xhtml) &amp; **operator=** ([Streams](classansys_1_1dpf_1_1Streams.xhtml) &amp;&amp;) noexcept void [releaseFiles](classansys_1_1dpf_1_1Streams.xhtml#a959c1869453d29b05a9fe3ce191404fb) () void [addStream](classansys_1_1dpf_1_1Streams.xhtml#a13bc16955004519b53af3b0cc4ab613a) ([ExternalStream](classansys_1_1dpf_1_1ExternalStream.xhtml) \*stream) void [addStream](classansys_1_1dpf_1_1Streams.xhtml#a6451cbe0726b6ab1da471b7bda20fabb) ([ExternalStream](classansys_1_1dpf_1_1ExternalStream.xhtml) \*stream, [LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) const &amp;identifier) <a id="a1e1392a7f458c6a150f8cca4b02eb73f" name="a1e1392a7f458c6a150f8cca4b02eb73f"></a>template&lt;typename ExternalStreamType &gt; ExternalStreamType \*const **getExternalStream** (std::string const &amp;key) const <a id="ab140ed7556c377c5332578fbb5a28a21" name="ab140ed7556c377c5332578fbb5a28a21"></a>template&lt;typename ExternalStreamType &gt; ExternalStreamType \*const **getExternalStream** ([LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) const &amp;identifier) const <a id="a6cc780b11dc285dab97f73e1cb347872" name="a6cc780b11dc285dab97f73e1cb347872"></a>[DataSources](classansys_1_1dpf_1_1DataSources.xhtml) **dataSources** () const ![-](/sites/default/files/migrate-content/dpf_cpp_client_library_2025_r2_new_link_to_op_1/closed.png) Public Member Functions inherited from [ansys::dpf::DpfTypes](classansys_1_1dpf_1_1DpfTypes.xhtml)virtual bool [empty](classansys_1_1dpf_1_1DpfTypes.xhtml#a39cd546c42518e2332be8f287db95459) () const virtual bool [hasInternalObject](classansys_1_1dpf_1_1DpfTypes.xhtml#ae198f89868d85c7db6dc1a934a1d3c15) () const virtual std::string [describe](classansys_1_1dpf_1_1DpfTypes.xhtml#a9977945710983bc03d2940fa007847b2) () const so::API const \* [callAPI](classansys_1_1dpf_1_1DpfTypes.xhtml#aea34d37e0c080126eff70db34bf46597) () const bool [isOnCommonAPI](classansys_1_1dpf_1_1DpfTypes.xhtml#a9f9789ff61cc9d400a2a344830706b73) () const bool [getClient](classansys_1_1dpf_1_1DpfTypes.xhtml#a968afd9daa0b0f13b65a2ac61369d73a) ([Client](classansys_1_1dpf_1_1Client.xhtml) &amp;client) const bool [hasBeenMovedLocally](classansys_1_1dpf_1_1DpfTypes.xhtml#a1a5634202c15404b6b24e8f50e51cb66) () const bool [isSameObject](classansys_1_1dpf_1_1DpfTypes.xhtml#aa64d5f8fcd7d85ad6ebf708494dbefd7) ([DpfTypes](classansys_1_1dpf_1_1DpfTypes.xhtml) const &amp;rhs) const ## <a id="pub-static-methods" name="pub-static-methods"></a>Static Public Member Functions

static [Streams](classansys_1_1dpf_1_1Streams.xhtml) [emptyStreams](classansys_1_1dpf_1_1Streams.xhtml#a5bace24c4a163ba13a5aca8fb6f24199) () <a id="details" name="details"></a>## Detailed Description

Defines an open, ready-to-use, data sources.

[Streams](classansys_1_1dpf_1_1Streams.xhtml) is an entity containing the data sources. Once the files in the streams are opened, they stay opened and they keep some data in cache to make the next evaluations faster. To close the files, release the streams.



## Constructor &amp; Destructor Documentation

<a id="a2fb94c03c22c93198568b298397a39f0" name="a2fb94c03c22c93198568b298397a39f0"></a>## [◆ ](#a2fb94c03c22c93198568b298397a39f0)Streams() \[1/2\]

 ansys::dpf::Streams::Streams  ( [DataSources](classansys_1_1dpf_1_1DataSources.xhtml) const &amp;  *dataSources*) 

Create a stream from given data sources.

Parameters \[in\]dataSourcesData source from which to create stream. 



<a id="a24c07bb8c759f0a8b2cacd44af9ac929" name="a24c07bb8c759f0a8b2cacd44af9ac929"></a>## [◆ ](#a24c07bb8c759f0a8b2cacd44af9ac929)Streams() \[2/2\]

 ansys::dpf::Streams::Streams  ( int  *id*,    [Client](classansys_1_1dpf_1_1Client.xhtml) const \*const  *client*   ) 

Retrieve an existing instance of [Streams](classansys_1_1dpf_1_1Streams.xhtml "Defines an open, ready-to-use, data sources.") on a server.

Parameters \[in\]idId of the [Streams](classansys_1_1dpf_1_1Streams.xhtml "Defines an open, ready-to-use, data sources.") on the server's database. \[in\]client[Client](classansys_1_1dpf_1_1Client.xhtml) instance designating the IP, port and protocol to use. 



## Member Function Documentation

<a id="a13bc16955004519b53af3b0cc4ab613a" name="a13bc16955004519b53af3b0cc4ab613a"></a>## [◆ ](#a13bc16955004519b53af3b0cc4ab613a)addStream() \[1/2\]

 void ansys::dpf::Streams::addStream  ( [ExternalStream](classansys_1_1dpf_1_1ExternalStream.xhtml) \*  *stream*) 

Add external stream.

Parameters \[in\]streamExternal stream to add. 



<a id="a6451cbe0726b6ab1da471b7bda20fabb" name="a6451cbe0726b6ab1da471b7bda20fabb"></a>## [◆ ](#a6451cbe0726b6ab1da471b7bda20fabb)addStream() \[2/2\]

 void ansys::dpf::Streams::addStream  ( [ExternalStream](classansys_1_1dpf_1_1ExternalStream.xhtml) \*  *stream*,    [LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) const &amp;  *identifier*   ) 

Add external stream.

Parameters \[in\]streamExternal stream to add. \[in\]identifierIdentifier returned by the data sources. 



<a id="a5bace24c4a163ba13a5aca8fb6f24199" name="a5bace24c4a163ba13a5aca8fb6f24199"></a>## [◆ ](#a5bace24c4a163ba13a5aca8fb6f24199)emptyStreams()

 static [Streams](classansys_1_1dpf_1_1Streams.xhtml) ansys::dpf::Streams::emptyStreams  ( )   static 

Create an empty streams.

ReturnsEmpty [Streams](classansys_1_1dpf_1_1Streams.xhtml). 



<a id="a959c1869453d29b05a9fe3ce191404fb" name="a959c1869453d29b05a9fe3ce191404fb"></a>## [◆ ](#a959c1869453d29b05a9fe3ce191404fb)releaseFiles()

 void ansys::dpf::Streams::releaseFiles  ( ) 

Closes all files and releases file resources.