    

 ## On this page

  

 

 # InputScalarData

 Last update: 17.07.2025 

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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



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

<a id="l00099" 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#a1df3c00def6b68506e74ad80d374999f)

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

Provide a copy-assign operator.



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

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:219](CommonTypes_8hpp_source.xhtml#l00219)



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

@ Double

**Definition** [CommonTypes.hpp:221](CommonTypes_8hpp_source.xhtml#l00221)