> ## 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.

# sysc::OutputScalarData Class Reference

Part of [C++ Interfaces for Participant Library](https://developer.synopsys.com/docs/system-coupling/system-coupling-cpp-library/group__SystemCouplingParticipantAPIs)

Provide a class for output scalar data.

`#include <OutputScalarData.hpp>`

## Public Member Functions

| Type | Name |
| - | - |
| | [OutputScalarData](#a0c295be497ed08e0e9831b54731edb06) (const double \*data, std::size\_t [size](#a75c7feb1b7eb4af572352c9ccabc7960)) Provide a constructor for output scalar data. |
| | [OutputScalarData](#ab5c5cda94b99e246dc238885e8ab0a7e) (const float \*data, std::size\_t [size](#a75c7feb1b7eb4af572352c9ccabc7960)) Provide a constructor for output scalar data. |
| | [OutputScalarData](#ad0f7ad860a57401cd183e8c689ef7514) (const std::vector\< double > \&data) Provide a constructor for output scalar data. |
| | [OutputScalarData](#a5ed2f8ce333e14641f2254f542b97ff9) (const std::vector\< float > \&data) Provide a constructor for output scalar data. |
| | [OutputScalarData](#a81966c06b45df17fcb3039e8e0e6e839) (const std::uint16\_t \*data, std::size\_t [size](#a75c7feb1b7eb4af572352c9ccabc7960)) Provide a constructor for [OutputScalarData](https://developer.synopsys.com/docs/system-coupling/system-coupling-cpp-library/classsysc_1_1OutputScalarData.md), which provides read-only access to scalar array of unsigned 16-bit integers. |
| | [OutputScalarData](#ae3fe5b13c079f1f417966373da0d0f1a) (const std::vector\< std::uint16\_t > \&data) Provide an STL vector variation of constructor for [OutputScalarData](https://developer.synopsys.com/docs/system-coupling/system-coupling-cpp-library/classsysc_1_1OutputScalarData.md), which provides read-only access to scalar array of unsigned 16-bit integers. |
| | [OutputScalarData](#a97c1234dee15d9fc662f8f339543fdde) (const std::uint64\_t \*data, std::size\_t [size](#a75c7feb1b7eb4af572352c9ccabc7960)) Provide a constructor for [OutputScalarData](https://developer.synopsys.com/docs/system-coupling/system-coupling-cpp-library/classsysc_1_1OutputScalarData.md), which provides read-only access to scalar array of unsigned 64-bit integers. |
| | [OutputScalarData](#a8ce242f8370551d3b45586b4d292585e) (const std::vector\< std::uint64\_t > \&data) Provide an STL vector variation of constructor for [OutputScalarData](https://developer.synopsys.com/docs/system-coupling/system-coupling-cpp-library/classsysc_1_1OutputScalarData.md), which provides read-only access to scalar array of unsigned 64-bit integers. |
| | [OutputScalarData](#af9ac21cfcac5b9870d58a526aaa8c10c) (const std::int32\_t \*data, std::size\_t [size](#a75c7feb1b7eb4af572352c9ccabc7960)) Provide a constructor for [OutputScalarData](https://developer.synopsys.com/docs/system-coupling/system-coupling-cpp-library/classsysc_1_1OutputScalarData.md), which provides read-only access to scalar array of 32-bit integers. |
| | [OutputScalarData](#a66895325f9405302665064f2d988f024) (const std::vector\< std::int32\_t > \&data) Provide an STL vector variation of constructor for [OutputScalarData](https://developer.synopsys.com/docs/system-coupling/system-coupling-cpp-library/classsysc_1_1OutputScalarData.md), which provides read-only access to scalar array of 32-bit integers. |
| | [OutputScalarData](#a302c60d8c198a99c635fbdf9432bb9c2) (const std::int64\_t \*data, std::size\_t [size](#a75c7feb1b7eb4af572352c9ccabc7960)) Provide a constructor for [OutputScalarData](https://developer.synopsys.com/docs/system-coupling/system-coupling-cpp-library/classsysc_1_1OutputScalarData.md), which provides read-only access to scalar array of 64-bit integers. |
| | [OutputScalarData](#a4bfbce8b70e9015ad5f8b97d9feef0c9) (const std::vector\< std::int64\_t > \&data) Provide an STL vector variation of constructor for [OutputScalarData](https://developer.synopsys.com/docs/system-coupling/system-coupling-cpp-library/classsysc_1_1OutputScalarData.md), which provides read-only access to scalar array of 64-bit integers. |
| | [OutputScalarData](#aaf3b08dff47cd5902d6ca62f0872312f) ()=default Provide a default constructor. |
| | [OutputScalarData](#a1dbc9822f6ac6d63df34c6816aeef47c) (const [OutputScalarData](https://developer.synopsys.com/docs/system-coupling/system-coupling-cpp-library/classsysc_1_1OutputScalarData.md) &)=default Provide a copy-constructor. |
| | [OutputScalarData](#a19925345654472e8bdbe3fa8e9b23fb5) ([OutputScalarData](https://developer.synopsys.com/docs/system-coupling/system-coupling-cpp-library/classsysc_1_1OutputScalarData.md) &&)=default Provide a move-constructor. |
| [OutputScalarData](https://developer.synopsys.com/docs/system-coupling/system-coupling-cpp-library/classsysc_1_1OutputScalarData.md) & | [operator=](#ace213c30537e145a0bb5a3210c673b9a) (const [OutputScalarData](https://developer.synopsys.com/docs/system-coupling/system-coupling-cpp-library/classsysc_1_1OutputScalarData.md) &)=default Provide a copy-assign operator. |
| [OutputScalarData](https://developer.synopsys.com/docs/system-coupling/system-coupling-cpp-library/classsysc_1_1OutputScalarData.md) & | [operator=](#a6fc4462b476c4c5131d5eae0776f8db2) ([OutputScalarData](https://developer.synopsys.com/docs/system-coupling/system-coupling-cpp-library/classsysc_1_1OutputScalarData.md) &&)=default Provide a move-assign operator. |
|  std::size\_t | [size](#a75c7feb1b7eb4af572352c9ccabc7960) () const noexcept Get the size of data. |
|  bool | [empty](#a840f69a7825eb32e1e8c63b3e208be83) () const noexcept Check if array "data" is empty. |
| [sysc::PrimitiveType](https://developer.synopsys.com/docs/system-coupling/system-coupling-cpp-library/group__SystemCouplingParticipantAPIs#gad3b1c73e4a63f4d292d65f3db875e844) | [getDataType](#a7c8066141c2c20a9e0a1e6bbc088891c) () const noexcept Get the primitive type of data. |
| const void \* | [getData](#a7bbe6a6c38666b79590fd852b223c1ac) () const noexcept Get the pointer to the data. |

## Detailed Description

Provide a class for output scalar data.

Output scalar data provides read-only access to an array of scalar data.

Definition at line [24](https://developer.synopsys.com/docs/system-coupling/system-coupling-cpp-library/OutputScalarData_8hpp_source) of file [OutputScalarData.hpp](https://developer.synopsys.com/docs/system-coupling/system-coupling-cpp-library/OutputScalarData_8hpp_source).

## Constructor & Destructor Documentation

### OutputScalarData() \[1/12]

```cpp theme={null}
sysc::OutputScalarData::OutputScalarData(
    const double * data,
    std::size_t size
)
```

Provide a constructor for output scalar data.

**Parameters**

| Name | Description |
| - | - |
| data | - pointer to the double-precision array of data. |
| size | - number of elements in the array. |

### OutputScalarData() \[2/12]

```cpp theme={null}
sysc::OutputScalarData::OutputScalarData(
    const float * data,
    std::size_t size
)
```

Provide a constructor for output scalar data.

**Parameters**

| Name | Description |
| - | - |
| data | - pointer to the single-precision array of data. |
| size | - number of elements in the array. |

### OutputScalarData() \[3/12]

```cpp theme={null}
sysc::OutputScalarData::OutputScalarData(const std::vector< double > & data)
```

Provide a constructor for output scalar data.

**Parameters**

| Name | Description |
| - | - |
| data | Reference to STL vector of doubles. |

### OutputScalarData() \[4/12]

```cpp theme={null}
sysc::OutputScalarData::OutputScalarData(const std::vector< float > & data)
```

Provide a constructor for output scalar data.

**Parameters**

| Name | Description |
| - | - |
| data | Reference to STL vector of floats. |

### OutputScalarData() \[5/12]

```cpp theme={null}
sysc::OutputScalarData::OutputScalarData(
    const std::uint16_t * data,
    std::size_t size
)
```

Provide a constructor for [OutputScalarData](https://developer.synopsys.com/docs/system-coupling/system-coupling-cpp-library/classsysc_1_1OutputScalarData.md), which provides read-only access to scalar array of unsigned 16-bit integers.

**Parameters**

| Name | Description |
| - | - |
| data | Pointer to the first index in the array of unsigned 16-bit integers. |
| size | Number of elements in the array of unsigned 16-bit integers. |

### OutputScalarData() \[6/12]

```cpp theme={null}
sysc::OutputScalarData::OutputScalarData(const std::vector< std::uint16_t > & data)
```

Provide an STL vector variation of constructor for [OutputScalarData](https://developer.synopsys.com/docs/system-coupling/system-coupling-cpp-library/classsysc_1_1OutputScalarData.md), which provides read-only access to scalar array of unsigned 16-bit integers.

**Parameters**

| Name | Description |
| - | - |
| data | Reference to STL vector of unsigned 16-bit integers. |

### OutputScalarData() \[7/12]

```cpp theme={null}
sysc::OutputScalarData::OutputScalarData(
    const std::uint64_t * data,
    std::size_t size
)
```

Provide a constructor for [OutputScalarData](https://developer.synopsys.com/docs/system-coupling/system-coupling-cpp-library/classsysc_1_1OutputScalarData.md), which provides read-only access to scalar array of unsigned 64-bit integers.

**Parameters**

| Name | Description |
| - | - |
| data | Pointer to the first index in the array of unsigned 64-bit integers. |
| size | Number of elements in the array of unsigned 64-bit integers. |

### OutputScalarData() \[8/12]

```cpp theme={null}
sysc::OutputScalarData::OutputScalarData(const std::vector< std::uint64_t > & data)
```

Provide an STL vector variation of constructor for [OutputScalarData](https://developer.synopsys.com/docs/system-coupling/system-coupling-cpp-library/classsysc_1_1OutputScalarData.md), which provides read-only access to scalar array of unsigned 64-bit integers.

**Parameters**

| Name | Description |
| - | - |
| data | Reference to STL vector of unsigned 64-bit integers. |

### OutputScalarData() \[9/12]

```cpp theme={null}
sysc::OutputScalarData::OutputScalarData(
    const std::int32_t * data,
    std::size_t size
)
```

Provide a constructor for [OutputScalarData](https://developer.synopsys.com/docs/system-coupling/system-coupling-cpp-library/classsysc_1_1OutputScalarData.md), which provides read-only access to scalar array of 32-bit integers.

**Parameters**

| Name | Description |
| - | - |
| data | Pointer to the first index in the array of unsigned 32-bit integers. |
| size | Number of elements in the array of unsigned 16-bit integers. |

### OutputScalarData() \[10/12]

```cpp theme={null}
sysc::OutputScalarData::OutputScalarData(const std::vector< std::int32_t > & data)
```

Provide an STL vector variation of constructor for [OutputScalarData](https://developer.synopsys.com/docs/system-coupling/system-coupling-cpp-library/classsysc_1_1OutputScalarData.md), which provides read-only access to scalar array of 32-bit integers.

**Parameters**

| Name | Description |
| - | - |
| data | Reference to STL vector of 32-bit integers. |

### OutputScalarData() \[11/12]

```cpp theme={null}
sysc::OutputScalarData::OutputScalarData(
    const std::int64_t * data,
    std::size_t size
)
```

Provide a constructor for [OutputScalarData](https://developer.synopsys.com/docs/system-coupling/system-coupling-cpp-library/classsysc_1_1OutputScalarData.md), which provides read-only access to scalar array of 64-bit integers.

**Parameters**

| Name | Description |
| - | - |
| data | Pointer to the first index in the array of unsigned 64-bit integers. |
| size | Number of elements in the array of unsigned 64-bit integers. |

### OutputScalarData() \[12/12]

```cpp theme={null}
sysc::OutputScalarData::OutputScalarData(const std::vector< std::int64_t > & data)
```

Provide an STL vector variation of constructor for [OutputScalarData](https://developer.synopsys.com/docs/system-coupling/system-coupling-cpp-library/classsysc_1_1OutputScalarData.md), which provides read-only access to scalar array of 64-bit integers.

**Parameters**

| Name | Description |
| - | - |
| data | Reference to STL vector of 64-bit integers. |

## Member Function Documentation

### getData()

```cpp theme={null}
const void* sysc::OutputScalarData::getData() const
```

`noexcept`

Get the pointer to the data.

For internal use only (no back-compatibility guarantee).

References [sysc::Double](https://developer.synopsys.com/docs/system-coupling/system-coupling-cpp-library/CommonTypes_8hpp_source).

### getDataType()

```cpp theme={null}
sysc::PrimitiveType sysc::OutputScalarData::getDataType() const
```

`noexcept`

Get the primitive type of data.

For internal use only (no back-compatibility guarantee).
