    

 ## On this page

  

 

 # InputScalarData

 Last update: 17.07.2025 

<a name="l00001"></a> 1 /\*

<a name="l00002"></a> 2 \* Copyright ANSYS, Inc. Unauthorized use, distribution, or duplication is prohibited.

<a name="l00003"></a> 3 \*/

<a name="l00004"></a> 4 

<a name="l00005"></a> 5 \#pragma once

<a name="l00006"></a> 6 

<a name="l00007"></a> 7 \#include "SystemCouplingParticipant/LibraryType.hpp"

<a name="l00008"></a> 8 

<a name="l00009"></a> 9 \#include "SystemCouplingParticipant/CommonTypes.hpp"

<a name="l00010"></a> 10 

<a name="l00011"></a> 11 \#include &lt;cstddef&gt;

<a name="l00012"></a> 12 \#include &lt;vector&gt;

<a name="l00013"></a> 13 

<a name="l00014"></a> 14 namespace sysc {

<a name="l00015"></a> 15 

<a name="l00023"></a>[ 23](classsysc_1_1InputScalarData.xhtml) class SYSTEM_COUPLING_PARTICIPANT_DLL [InputScalarData](classsysc_1_1InputScalarData.xhtml) {

<a name="l00024"></a> 24 public:

<a name="l00031"></a>[ 31](classsysc_1_1InputScalarData.xhtml#afb2631211cf5550a612983438f71479b) [InputScalarData](classsysc_1_1InputScalarData.xhtml#afb2631211cf5550a612983438f71479b)(

<a name="l00032"></a> 32 double* data,

<a name="l00033"></a> 33 std::size_t size);

<a name="l00034"></a> 34 

<a name="l00041"></a>[ 41](classsysc_1_1InputScalarData.xhtml#aaa8a75a57967d0e25b33fe88d77553a5) [InputScalarData](classsysc_1_1InputScalarData.xhtml#aaa8a75a57967d0e25b33fe88d77553a5)(

<a name="l00042"></a> 42 float* data,

<a name="l00043"></a> 43 std::size_t size);

<a name="l00044"></a> 44 

<a name="l00050"></a>[ 50](classsysc_1_1InputScalarData.xhtml#a90bffff1edbccc52b9807af3881c11ac) [InputScalarData](classsysc_1_1InputScalarData.xhtml#a90bffff1edbccc52b9807af3881c11ac)(std::vector&lt;double&gt;&amp; data);

<a name="l00051"></a> 51 

<a name="l00058"></a>[ 58](classsysc_1_1InputScalarData.xhtml#a1380850d03279cd3f11e4e65cbc9f064) [InputScalarData](classsysc_1_1InputScalarData.xhtml#a1380850d03279cd3f11e4e65cbc9f064)(std::vector&lt;float&gt;&amp; data);

<a name="l00059"></a> 59 

<a name="l00061"></a>[ 61](classsysc_1_1InputScalarData.xhtml#a1dbb88c3363e1b40e8b60f281e42be05) [InputScalarData](classsysc_1_1InputScalarData.xhtml#a1dbb88c3363e1b40e8b60f281e42be05)() = default;

<a name="l00062"></a> 62 

<a name="l00064"></a>[ 64](classsysc_1_1InputScalarData.xhtml#ae6c55f6cd5109f97f207e3ab2f07ad47) [InputScalarData](classsysc_1_1InputScalarData.xhtml#ae6c55f6cd5109f97f207e3ab2f07ad47)(const [InputScalarData](classsysc_1_1InputScalarData.xhtml)&amp;) = default;

<a name="l00065"></a> 65 

<a name="l00067"></a>[ 67](classsysc_1_1InputScalarData.xhtml#ad8ff168a7cd8ed62728594cf3b22b791) [InputScalarData](classsysc_1_1InputScalarData.xhtml#ad8ff168a7cd8ed62728594cf3b22b791)([InputScalarData](classsysc_1_1InputScalarData.xhtml)&amp;&amp;) = default;

<a name="l00068"></a> 68 

<a name="l00070"></a>[ 70](classsysc_1_1InputScalarData.xhtml#a2fe5667de3d73e4c317d3ef1bc3c8893) [InputScalarData](classsysc_1_1InputScalarData.xhtml)&amp; [operator=](classsysc_1_1InputScalarData.xhtml#a2fe5667de3d73e4c317d3ef1bc3c8893)(const [InputScalarData](classsysc_1_1InputScalarData.xhtml)&amp;) = default;

<a name="l00071"></a> 71 

<a name="l00073"></a>[ 73](classsysc_1_1InputScalarData.xhtml#a62d7585f5fdad7c94ff4fefb8f38989e) [InputScalarData](classsysc_1_1InputScalarData.xhtml)&amp; [operator=](classsysc_1_1InputScalarData.xhtml#a62d7585f5fdad7c94ff4fefb8f38989e)([InputScalarData](classsysc_1_1InputScalarData.xhtml)&amp;&amp;) = default;

<a name="l00074"></a> 74 

<a name="l00076"></a>[ 76](classsysc_1_1InputScalarData.xhtml#ab30285336db3ff38293904e8dbe6583d) std::size_t [size](classsysc_1_1InputScalarData.xhtml#ab30285336db3ff38293904e8dbe6583d)() const noexcept;

<a name="l00077"></a> 77 

<a name="l00079"></a>[ 79](classsysc_1_1InputScalarData.xhtml#ac7440118cc57a71e6d25aeb9184d3693) bool empty() const noexcept;

<a name="l00080"></a> 80 

<a name="l00085"></a>[ 85](classsysc_1_1InputScalarData.xhtml#a6468902b8f2e27053c09c25ed05562de) sysc::[PrimitiveType](group__SystemCouplingParticipantAPIs.xhtml#gad3b1c73e4a63f4d292d65f3db875e844) getDataType() const noexcept;

<a name="l00086"></a> 86 

<a name="l00091"></a>[ 91](classsysc_1_1InputScalarData.xhtml#a70fafa6880145e0618cd828e1c7eb574) void* getData() const noexcept;

<a name="l00092"></a> 92 

<a name="l00093"></a> 93 private:

<a name="l00094"></a> 94 sysc::[PrimitiveType](group__SystemCouplingParticipantAPIs.xhtml#gad3b1c73e4a63f4d292d65f3db875e844) m_dataType{[sysc::Double](group__SystemCouplingParticipantAPIs.xhtml#ggad3b1c73e4a63f4d292d65f3db875e844a29843d2c1bb5760f768dcc066dac1ac1)};

<a name="l00095"></a> 95 void* m_data{nullptr};

<a name="l00096"></a> 96 std::size_t m_size{0};

<a name="l00097"></a> 97 };

<a name="l00098"></a> 98 

<a name="l00099"></a> 99 } // namespace sysc

[sysc::InputScalarData](classsysc_1_1InputScalarData.xhtml)

Provide a class for input scalar data.

**Definition:** [InputScalarData.hpp:23](InputScalarData_8hpp_source.xhtml#l00023)



[sysc::InputScalarData::InputScalarData](classsysc_1_1InputScalarData.xhtml#a1380850d03279cd3f11e4e65cbc9f064)

InputScalarData(std::vector&lt; float &gt; &amp;data)

Provide a constructor for input scalar data.



[sysc::InputScalarData::InputScalarData](classsysc_1_1InputScalarData.xhtml#a1dbb88c3363e1b40e8b60f281e42be05)

InputScalarData()=default

Provide a default constructor.



[sysc::InputScalarData::operator=](classsysc_1_1InputScalarData.xhtml#a2fe5667de3d73e4c317d3ef1bc3c8893)

InputScalarData &amp; operator=(const InputScalarData &amp;)=default

Provide a copy-assign operator.



[sysc::InputScalarData::operator=](classsysc_1_1InputScalarData.xhtml#a62d7585f5fdad7c94ff4fefb8f38989e)

InputScalarData &amp; operator=(InputScalarData &amp;&amp;)=default

Provide a move-assign operator.



[sysc::InputScalarData::InputScalarData](classsysc_1_1InputScalarData.xhtml#a90bffff1edbccc52b9807af3881c11ac)

InputScalarData(std::vector&lt; double &gt; &amp;data)

Provide a constructor for input scalar data.



[sysc::InputScalarData::InputScalarData](classsysc_1_1InputScalarData.xhtml#aaa8a75a57967d0e25b33fe88d77553a5)

InputScalarData(float *data, std::size_t size)

Provide a constructor for input scalar data.



[sysc::InputScalarData::size](classsysc_1_1InputScalarData.xhtml#ab30285336db3ff38293904e8dbe6583d)

std::size_t size() const noexcept

Get the size of data.



[sysc::InputScalarData::InputScalarData](classsysc_1_1InputScalarData.xhtml#ad8ff168a7cd8ed62728594cf3b22b791)

InputScalarData(InputScalarData &amp;&amp;)=default

Provide a move-constructor.



[sysc::InputScalarData::InputScalarData](classsysc_1_1InputScalarData.xhtml#ae6c55f6cd5109f97f207e3ab2f07ad47)

InputScalarData(const InputScalarData &amp;)=default

Provide a copy-constructor.



[sysc::InputScalarData::InputScalarData](classsysc_1_1InputScalarData.xhtml#afb2631211cf5550a612983438f71479b)

InputScalarData(double *data, std::size_t size)

Provide a constructor for input scalar data.



[sysc::PrimitiveType](group__SystemCouplingParticipantAPIs.xhtml#gad3b1c73e4a63f4d292d65f3db875e844)

PrimitiveType

Provide enum for supported primitive types.

**Definition:** [CommonTypes.hpp:220](CommonTypes_8hpp_source.xhtml#l00220)



[sysc::Double](group__SystemCouplingParticipantAPIs.xhtml#ggad3b1c73e4a63f4d292d65f3db875e844a29843d2c1bb5760f768dcc066dac1ac1)

@ Double

**Definition:** [CommonTypes.hpp:222](CommonTypes_8hpp_source.xhtml#l00222)