> ## 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::InputScalarData 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 input scalar data.

`#include <InputScalarData.hpp>`

## Public Member Functions

| Type | Name |
| - | - |
| | [InputScalarData](#afb2631211cf5550a612983438f71479b) (double \*data, std::size\_t [size](#ab30285336db3ff38293904e8dbe6583d)) Provide a constructor for input scalar data. |
| | [InputScalarData](#aaa8a75a57967d0e25b33fe88d77553a5) (float \*data, std::size\_t [size](#ab30285336db3ff38293904e8dbe6583d)) Provide a constructor for input scalar data. |
| | [InputScalarData](#a90bffff1edbccc52b9807af3881c11ac) (std::vector\< double > \&data) Provide a constructor for input scalar data. |
| | [InputScalarData](#a1380850d03279cd3f11e4e65cbc9f064) (std::vector\< float > \&data) Provide a constructor for input scalar data. |
| | [InputScalarData](#a1dbb88c3363e1b40e8b60f281e42be05) ()=default Provide a default constructor. |
| | [InputScalarData](#ae6c55f6cd5109f97f207e3ab2f07ad47) (const [InputScalarData](https://developer.synopsys.com/docs/system-coupling/system-coupling-cpp-library/classsysc_1_1InputScalarData.md) &)=default Provide a copy-constructor. |
| | [InputScalarData](#ad8ff168a7cd8ed62728594cf3b22b791) ([InputScalarData](https://developer.synopsys.com/docs/system-coupling/system-coupling-cpp-library/classsysc_1_1InputScalarData.md) &&)=default Provide a move-constructor. |
| [InputScalarData](https://developer.synopsys.com/docs/system-coupling/system-coupling-cpp-library/classsysc_1_1InputScalarData.md) & | [operator=](#a2fe5667de3d73e4c317d3ef1bc3c8893) (const [InputScalarData](https://developer.synopsys.com/docs/system-coupling/system-coupling-cpp-library/classsysc_1_1InputScalarData.md) &)=default Provide a copy-assign operator. |
| [InputScalarData](https://developer.synopsys.com/docs/system-coupling/system-coupling-cpp-library/classsysc_1_1InputScalarData.md) & | [operator=](#a62d7585f5fdad7c94ff4fefb8f38989e) ([InputScalarData](https://developer.synopsys.com/docs/system-coupling/system-coupling-cpp-library/classsysc_1_1InputScalarData.md) &&)=default Provide a move-assign operator. |
|  std::size\_t | [size](#ab30285336db3ff38293904e8dbe6583d) () const noexcept Get the size of data. |
|  bool | [empty](#ac7440118cc57a71e6d25aeb9184d3693) () 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](#a6468902b8f2e27053c09c25ed05562de) () const noexcept Get the primitive type of data. |
| void \* | [getData](#a70fafa6880145e0618cd828e1c7eb574) () const noexcept Get the pointer to the data. |

## Detailed Description

Provide a class for input scalar data.

Input scalar data provides read and write access to an array of scalar data.

Definition at line [23](https://developer.synopsys.com/docs/system-coupling/system-coupling-cpp-library/InputScalarData_8hpp_source) of file [InputScalarData.hpp](https://developer.synopsys.com/docs/system-coupling/system-coupling-cpp-library/InputScalarData_8hpp_source).

## Constructor & Destructor Documentation

### InputScalarData() \[1/4]

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

Provide a constructor for input scalar data.

**Parameters**

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

### InputScalarData() \[2/4]

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

Provide a constructor for input scalar data.

**Parameters**

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

### InputScalarData() \[3/4]

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

Provide a constructor for input scalar data.

**Parameters**

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

### InputScalarData() \[4/4]

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

Provide a constructor for input scalar data.

**Parameters**

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

## Member Function Documentation

### getData()

```cpp theme={null}
void* sysc::InputScalarData::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::InputScalarData::getDataType() const
```

`noexcept`

Get the primitive type of data.

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