> ## 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 sysc::CouplingInterface

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

**Definition**: `CouplingInterface.hpp` (line 28)

Provide a class for a coupling interface.

Coupling interface can be used to set up the transfers of data between different regions within the same participant solver. Interface contains two sides and each side can contain one or more regions.

All regions on one side of the interface must have the same topology.

## Members

* [addDataTransfer](#classsysc_1_1CouplingInterface_1ab1230f4b0c7dc52fff73d1ddcd67f03e)
* [addSideOneRegion](#classsysc_1_1CouplingInterface_1ab7a385065f0fde034baa88a88f274946)
* [addSideTwoRegion](#classsysc_1_1CouplingInterface_1a5afdb8ffa5c06d66fe30e6f150230b67)
* [CouplingInterface](#classsysc_1_1CouplingInterface_1a606ddfa3113e3e0bf1ee7eee2b58793d)
* [getDataTransfer](#classsysc_1_1CouplingInterface_1aeff28058491eb4a52d5833f38b4214c7)
* [getName](#classsysc_1_1CouplingInterface_1ac9975e59d9c18d893af5b153211e2635)
* [getNumDataTransfers](#classsysc_1_1CouplingInterface_1a9ac1bf66c466b9567e26fdf5c2108c05)
* [getNumSideOneRegions](#classsysc_1_1CouplingInterface_1a84873c1535d70a88096d44242c97a1b7)
* [getNumSideTwoRegions](#classsysc_1_1CouplingInterface_1a03a32678f212092a83149ea2b0c54f20)
* [getSideOneRegion](#classsysc_1_1CouplingInterface_1a540b82fcd3f5aa6c5e3726e429960d35)
* [getSideTwoRegion](#classsysc_1_1CouplingInterface_1a824ed032106d36fd0202a8b6f92a8a20)
* [m\_dataTransfers](#classsysc_1_1CouplingInterface_1a72a7d21e64692ba517f920301d7bc6ff)
* [m\_name](#classsysc_1_1CouplingInterface_1aafbe3ef2afb0e2f496d4bb7d90998063)
* [m\_sideOneRegions](#classsysc_1_1CouplingInterface_1a0f56f6e8ae5eb0d6836e0fceef8db94e)
* [m\_sideOneRegionsNameToIndex](#classsysc_1_1CouplingInterface_1a43da263e07f3f85854e35d1a25972087)
* [m\_sideTwoRegions](#classsysc_1_1CouplingInterface_1af448ebfbacdc9ebf704c1823ad07ad36)
* [m\_sideTwoRegionsNameToIndex](#classsysc_1_1CouplingInterface_1a53fce6f5fa4c32b40c28fe0053740327)

## Private attributes

### Variable m\_name

![][private]

**Definition**: `CouplingInterface.hpp` (line 101)

```cpp theme={null}
CouplingInterfaceName sysc::CouplingInterface::m_name
```

**Type**: [CouplingInterfaceName](https://developer.synopsys.com/docs/system-coupling/system-coupling-participant-library/cpp-reference/namespacesysc#group__SystemCouplingParticipantAPIs_1ga5dfb2720e04b5892c7174b54825e4a4c)

### Variable m\_sideOneRegions

![][private]

**Definition**: `CouplingInterface.hpp` (line 103)

```cpp theme={null}
std::vector<Region> sysc::CouplingInterface::m_sideOneRegions
```

**Type**: std::vector\< [Region](https://developer.synopsys.com/docs/system-coupling/system-coupling-participant-library/cpp-reference/classsysc_1_1Region.md) >

### Variable m\_sideOneRegionsNameToIndex

![][private]

**Definition**: `CouplingInterface.hpp` (line 104)

```cpp theme={null}
std::map<RegionName, std::size_t> sysc::CouplingInterface::m_sideOneRegionsNameToIndex
```

**Type**: std::map\< [RegionName](https://developer.synopsys.com/docs/system-coupling/system-coupling-participant-library/cpp-reference/namespacesysc#group__SystemCouplingParticipantAPIs_1ga9bdc82c1ffda4e71e561435ff5743d80), std::size\_t >

### Variable m\_sideTwoRegions

![][private]

**Definition**: `CouplingInterface.hpp` (line 106)

```cpp theme={null}
std::vector<Region> sysc::CouplingInterface::m_sideTwoRegions
```

**Type**: std::vector\< [Region](https://developer.synopsys.com/docs/system-coupling/system-coupling-participant-library/cpp-reference/classsysc_1_1Region.md) >

### Variable m\_sideTwoRegionsNameToIndex

![][private]

**Definition**: `CouplingInterface.hpp` (line 107)

```cpp theme={null}
std::map<RegionName, std::size_t> sysc::CouplingInterface::m_sideTwoRegionsNameToIndex
```

**Type**: std::map\< [RegionName](https://developer.synopsys.com/docs/system-coupling/system-coupling-participant-library/cpp-reference/namespacesysc#group__SystemCouplingParticipantAPIs_1ga9bdc82c1ffda4e71e561435ff5743d80), std::size\_t >

### Variable m\_dataTransfers

![][private]

**Definition**: `CouplingInterface.hpp` (line 109)

```cpp theme={null}
std::vector<DataTransfer> sysc::CouplingInterface::m_dataTransfers
```

**Type**: std::vector\< [DataTransfer](https://developer.synopsys.com/docs/system-coupling/system-coupling-participant-library/cpp-reference/classsysc_1_1DataTransfer.md) >

## Public functions

### Function CouplingInterface

![][public]

```cpp theme={null}
sysc::CouplingInterface::CouplingInterface(CouplingInterfaceName interfaceName)
```

Provide a constructor for the [CouplingInterface](https://developer.synopsys.com/docs/system-coupling/system-coupling-participant-library/cpp-reference/classsysc_1_1CouplingInterface.md) class.

**Parameters**:

* **interfaceName**: A unique name for the coupling interface.

**Parameters**:

* [CouplingInterfaceName](https://developer.synopsys.com/docs/system-coupling/system-coupling-participant-library/cpp-reference/namespacesysc#group__SystemCouplingParticipantAPIs_1ga5dfb2720e04b5892c7174b54825e4a4c) **interfaceName**

**Return type**:

### Function addSideOneRegion

![][public]

```cpp theme={null}
void sysc::CouplingInterface::addSideOneRegion(const Region &region)
```

Add region to side one of the interface.

If this region has already been added to the interface on side one, then this call will have no effect.

If a different region with the same name has already been added to the interface on side one, then a runtime error will be thrown.

If a region with the same name has already been added to the interface on side two, then a runtime error will be thrown.

If the region name contains invalid characters, a runtime error will be thrown.

**Parameters**:

* **region**: [Region](https://developer.synopsys.com/docs/system-coupling/system-coupling-participant-library/cpp-reference/classsysc_1_1Region.md) to be added to side one of the interface.

**Parameters**:

* const [Region](https://developer.synopsys.com/docs/system-coupling/system-coupling-participant-library/cpp-reference/classsysc_1_1Region.md) & **region**

**Return type**: void

### Function addSideTwoRegion

![][public]

```cpp theme={null}
void sysc::CouplingInterface::addSideTwoRegion(const Region &region)
```

Add region to side two of the interface.

If this region has already been added to the interface on side two, then this call will have no effect.

If a different region with the same name has already been added to the interface on side two, then a runtime error will be thrown.

If a region with the same name has already been added to the interface on side one, then a runtime error will be thrown.

If the region name contains invalid characters, a runtime error will be thrown.

**Parameters**:

* **region**: [Region](https://developer.synopsys.com/docs/system-coupling/system-coupling-participant-library/cpp-reference/classsysc_1_1Region.md) to be added to side one of the interface.

**Parameters**:

* const [Region](https://developer.synopsys.com/docs/system-coupling/system-coupling-participant-library/cpp-reference/classsysc_1_1Region.md) & **region**

**Return type**: void

### Function getName

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

```cpp theme={null}
const CouplingInterfaceName & sysc::CouplingInterface::getName() const
```

Get coupling interface name.

**Return type**: const [CouplingInterfaceName](https://developer.synopsys.com/docs/system-coupling/system-coupling-participant-library/cpp-reference/namespacesysc#group__SystemCouplingParticipantAPIs_1ga5dfb2720e04b5892c7174b54825e4a4c) &

### Function getNumSideOneRegions

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

```cpp theme={null}
std::size_t sysc::CouplingInterface::getNumSideOneRegions() const
```

Get the number of regions on side one of the interface.

**Return type**: std::size\_t

### Function getNumSideTwoRegions

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

```cpp theme={null}
std::size_t sysc::CouplingInterface::getNumSideTwoRegions() const
```

Get the number of regions on side two of the interface.

**Return type**: std::size\_t

### Function getSideOneRegion

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

```cpp theme={null}
const Region & sysc::CouplingInterface::getSideOneRegion(std::size_t index) const
```

Get the region on side one, given an index.

**Parameters**:

* std::size\_t **index**

**Return type**: const [Region](https://developer.synopsys.com/docs/system-coupling/system-coupling-participant-library/cpp-reference/classsysc_1_1Region.md) &

### Function getSideTwoRegion

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

```cpp theme={null}
const Region & sysc::CouplingInterface::getSideTwoRegion(std::size_t index) const
```

Get the region on side two, given an index.

**Parameters**:

* std::size\_t **index**

**Return type**: const [Region](https://developer.synopsys.com/docs/system-coupling/system-coupling-participant-library/cpp-reference/classsysc_1_1Region.md) &

### Function addDataTransfer

![][public]

```cpp theme={null}
void sysc::CouplingInterface::addDataTransfer(const DataTransfer &dataTransfer)
```

Add a data transfer.

**Parameters**:

* const [DataTransfer](https://developer.synopsys.com/docs/system-coupling/system-coupling-participant-library/cpp-reference/classsysc_1_1DataTransfer.md) & **dataTransfer**

**Return type**: void

### Function getNumDataTransfers

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

```cpp theme={null}
std::size_t sysc::CouplingInterface::getNumDataTransfers() const noexcept
```

Get the number of data transfers.

**Return type**: std::size\_t

### Function getDataTransfer

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

```cpp theme={null}
const DataTransfer & sysc::CouplingInterface::getDataTransfer(std::size_t index) const
```

Get the data transfer, given an index.

**Parameters**:

* std::size\_t **index**

**Return type**: const [DataTransfer](https://developer.synopsys.com/docs/system-coupling/system-coupling-participant-library/cpp-reference/classsysc_1_1DataTransfer.md) &

**References**:

* [getDataTransfer](#classsysc_1_1CouplingInterface_1aeff28058491eb4a52d5833f38b4214c7)

**Referenced by**:

* [getDataTransfer](#classsysc_1_1CouplingInterface_1aeff28058491eb4a52d5833f38b4214c7)

[private]: https://img.shields.io/badge/-private-red "private"

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

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

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