> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Class ansys::dpf::Streams

![][C++]
![][public]

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

[Streams](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-streams.md) 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.

**Inherits from**:

* [ansys::dpf::DpfTypes](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-dpftypes.md)

## Members

* [addStream](#classansys-dpf-streams-1a13bc16955004519b53af3b0cc4ab613a)
* [addStream](#classansys-dpf-streams-1a6451cbe0726b6ab1da471b7bda20fabb)
* [callAPI](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-dpftypes.md#classansys-dpf-dpftypes-1aea34d37e0c080126eff70db34bf46597)
* [dataSources](#classansys-dpf-streams-1a6cc780b11dc285dab97f73e1cb347872)
* [describe](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-dpftypes.md#classansys-dpf-dpftypes-1a9977945710983bc03d2940fa007847b2)
* [empty](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-dpftypes.md#classansys-dpf-dpftypes-1a39cd546c42518e2332be8f287db95459)
* [emptyStreams](#classansys-dpf-streams-1a5bace24c4a163ba13a5aca8fb6f24199)
* [getClient](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-dpftypes.md#classansys-dpf-dpftypes-1a968afd9daa0b0f13b65a2ac61369d73a)
* [getExternalStream](#classansys-dpf-streams-1a1e1392a7f458c6a150f8cca4b02eb73f)
* [getExternalStream](#classansys-dpf-streams-1ab140ed7556c377c5332578fbb5a28a21)
* [hasBeenMovedLocally](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-dpftypes.md#classansys-dpf-dpftypes-1a1a5634202c15404b6b24e8f50e51cb66)
* [hasInternalObject](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-dpftypes.md#classansys-dpf-dpftypes-1ae198f89868d85c7db6dc1a934a1d3c15)
* [isOnCommonAPI](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-dpftypes.md#classansys-dpf-dpftypes-1a9f9789ff61cc9d400a2a344830706b73)
* [isSameObject](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-dpftypes.md#classansys-dpf-dpftypes-1aa64d5f8fcd7d85ad6ebf708494dbefd7)
* [operator=](#classansys-dpf-streams-1a6f88f1efa7e63cf70d4998621697d182)
* [operator=](#classansys-dpf-streams-1ac8a81b6a8f8ffbf11c3d86cbe54f6c78)
* [releaseFiles](#classansys-dpf-streams-1a959c1869453d29b05a9fe3ce191404fb)
* [Streams](#classansys-dpf-streams-1a8260b408904e6e11e24e2cf1ca3f7bd2)
* [Streams](#classansys-dpf-streams-1a2d3487cb883138358d6e0cc76bb71974)
* [Streams](#classansys-dpf-streams-1a4e584cc75bc6d32cd768005451643ef9)
* [Streams](#classansys-dpf-streams-1a24c07bb8c759f0a8b2cacd44af9ac929)
* [\~DpfTypes](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-dpftypes.md#classansys-dpf-dpftypes-1ab7c83b6ea160c2b115e056f6c312112f)
* [\~Streams](#classansys-dpf-streams-1a3be81fb59adfb4050c563ade28ea99c5)

## Friends

## Public functions

### Function \~Streams

![][public]

```cpp theme={null}
virtual ansys::dpf::Streams::~Streams()
```

**Return type**:

### Function Streams

![][public]

```cpp theme={null}
ansys::dpf::Streams::Streams(DataSources const &dataSources, bool open_files=false)
```

Create a stream from given data sources.

**Parameters**:

* [DataSources](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-datasources.md) const & **dataSources**: \[in] Data source from which to create stream.
* bool **open\_files** = false : \[in] Wether files defined in the dataSources are opened at the creation of the [Streams](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-streams.md) (default false).

**Return type**:

### Function Streams

![][public]

```cpp theme={null}
ansys::dpf::Streams::Streams(Streams const &)
```

**Parameters**:

* Streams const &

**Return type**:

### Function Streams

![][public]

```cpp theme={null}
ansys::dpf::Streams::Streams(Streams &&) noexcept
```

**Parameters**:

* Streams &&

**Return type**:

### Function Streams

![][public]

```cpp theme={null}
ansys::dpf::Streams::Streams(int id, Client const *const client)
```

Retrieve an existing instance of [Streams](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-streams.md) on a server.

**Parameters**:

* int **id**: \[in] Id of the [Streams](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-streams.md) on the server's database.
* Client const \*const **client**: \[in] [Client](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-client.md) instance designating the IP, port and protocol to use.

**Return type**:

### Function operator=

![][public]

```cpp theme={null}
Streams & ansys::dpf::Streams::operator=(Streams const &)
```

**Parameters**:

* Streams const &

**Return type**: Streams &

### Function operator=

![][public]

```cpp theme={null}
Streams & ansys::dpf::Streams::operator=(Streams &&) noexcept
```

**Parameters**:

* Streams &&

**Return type**: Streams &

### Function releaseFiles

![][public]

```cpp theme={null}
void ansys::dpf::Streams::releaseFiles()
```

Closes all files and releases file resources.

**Return type**: void

### Function addStream

![][public]

```cpp theme={null}
void ansys::dpf::Streams::addStream(ExternalStream *stream)
```

Add external stream.

**Parameters**:

* [ExternalStream](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-externalstream.md) \* **stream**: \[in] External stream to add.

**Return type**: void

### Function addStream

![][public]

```cpp theme={null}
void ansys::dpf::Streams::addStream(ExternalStream *stream, LabelSpace const &identifier)
```

Add external stream.

**Parameters**:

* [ExternalStream](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-externalstream.md) \* **stream**: \[in] External stream to add.
* LabelSpace const & **identifier**: \[in] Identifier returned by the data sources.

**Return type**: void

### Function getExternalStream

![][public]
![][const]

```cpp theme={null}
ExternalStreamType *const ansys::dpf::Streams::getExternalStream(std::string const &key) const
```

**Parameters**:

* std::string const & **key**

**Return type**: ExternalStreamType \*const

### Function getExternalStream

![][public]
![][const]

```cpp theme={null}
ExternalStreamType *const ansys::dpf::Streams::getExternalStream(LabelSpace const &identifier) const
```

**Parameters**:

* LabelSpace const & **identifier**

**Return type**: ExternalStreamType \*const

### Function dataSources

![][public]
![][const]

```cpp theme={null}
DataSources ansys::dpf::Streams::dataSources() const
```

**Return type**: [DataSources](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-datasources.md)

## Public static functions

### Function emptyStreams

![][public]
![][static]

```cpp theme={null}
static Streams ansys::dpf::Streams::emptyStreams()
```

Create an empty streams.
**Returns**:

Empty [Streams](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-streams.md).

**Return type**: Streams

[C++]: https://img.shields.io/badge/language-C%2B%2B-blue "C++"

[const]: https://img.shields.io/badge/-const-lightblue "const"

[public]: https://img.shields.io/badge/-public-brightgreen "public"

[static]: https://img.shields.io/badge/-static-lightgrey "static"
