    

 ## On this page

  

 

 # Attribute

 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;cstdint&gt;

<a id="l00012" name="l00012"></a> 12 

<a id="l00013" name="l00013"></a> 13namespace sysc {

<a id="l00014" name="l00014"></a> 14 

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

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

<a id="l00034" name="l00034"></a>[ 34](classsysc_1_1RealAttribute.xhtml#ad46b89c811a79901af549e50173ca5f8) [RealAttribute](classsysc_1_1RealAttribute.xhtml#ad46b89c811a79901af549e50173ca5f8)(

<a id="l00035" name="l00035"></a> 35 [AttributeName](group__SystemCouplingParticipantAPIs.xhtml#gadb06eacf4ed0787d18e8ddbf0612c83c) name,

<a id="l00036" name="l00036"></a> 36 double value,

<a id="l00037" name="l00037"></a> 37 [Dimensionality](structsysc_1_1Dimensionality.xhtml) dimensionality);

<a id="l00038" name="l00038"></a> 38 

<a id="l00039" name="l00039"></a> 39 const [AttributeName](group__SystemCouplingParticipantAPIs.xhtml#gadb06eacf4ed0787d18e8ddbf0612c83c)&amp; getName() const noexcept;

<a id="l00040" name="l00040"></a> 40 

<a id="l00041" name="l00041"></a> 41 double getValue() const noexcept;

<a id="l00042" name="l00042"></a> 42 

<a id="l00043" name="l00043"></a> 43 const [Dimensionality](structsysc_1_1Dimensionality.xhtml)&amp; getDimensionality() const noexcept;

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

<a id="l00045" name="l00045"></a> 45 std::string getUnits() const;

<a id="l00046" name="l00046"></a> 46 

<a id="l00047" name="l00047"></a> 47private:

<a id="l00048" name="l00048"></a> 48 [AttributeName](group__SystemCouplingParticipantAPIs.xhtml#gadb06eacf4ed0787d18e8ddbf0612c83c) m_name;

<a id="l00049" name="l00049"></a> 49 double m_value{0.0};

<a id="l00050" name="l00050"></a> 50 [Dimensionality](structsysc_1_1Dimensionality.xhtml) m_dimensionality;

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



<a id="l00052" name="l00052"></a> 52 

<a id="l00061" name="l00061"></a>[ 61](classsysc_1_1IntegerAttribute.xhtml)class SYSTEM_COUPLING_PARTICIPANT_DLL [IntegerAttribute](classsysc_1_1IntegerAttribute.xhtml) {

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

<a id="l00071" name="l00071"></a>[ 71](classsysc_1_1IntegerAttribute.xhtml#afb0787aba682b1564ca5b23d506b264c) [IntegerAttribute](classsysc_1_1IntegerAttribute.xhtml#afb0787aba682b1564ca5b23d506b264c)(

<a id="l00072" name="l00072"></a> 72 [AttributeName](group__SystemCouplingParticipantAPIs.xhtml#gadb06eacf4ed0787d18e8ddbf0612c83c) name,

<a id="l00073" name="l00073"></a> 73 std::int64_t value);

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

<a id="l00075" name="l00075"></a> 75 const [AttributeName](group__SystemCouplingParticipantAPIs.xhtml#gadb06eacf4ed0787d18e8ddbf0612c83c)&amp; getName() const noexcept;

<a id="l00076" name="l00076"></a> 76 

<a id="l00077" name="l00077"></a> 77 std::int64_t getValue() const noexcept;

<a id="l00078" name="l00078"></a> 78 

<a id="l00079" name="l00079"></a> 79private:

<a id="l00080" name="l00080"></a> 80 [AttributeName](group__SystemCouplingParticipantAPIs.xhtml#gadb06eacf4ed0787d18e8ddbf0612c83c) m_name;

<a id="l00081" name="l00081"></a> 81 std::int64_t m_value{0};

<a id="l00082" name="l00082"></a> 82};



<a id="l00083" name="l00083"></a> 83 

<a id="l00084" name="l00084"></a> 84} // namespace sysc

[sysc::IntegerAttribute](classsysc_1_1IntegerAttribute.xhtml)

Provide a class for an integer-valued attribute.

**Definition** [Attribute.hpp:61](Attribute_8hpp_source.xhtml#l00061)



[sysc::IntegerAttribute::IntegerAttribute](classsysc_1_1IntegerAttribute.xhtml#afb0787aba682b1564ca5b23d506b264c)

IntegerAttribute(AttributeName name, std::int64_t value)

Provide a constructor for the IntegerAttribute class.



[sysc::RealAttribute](classsysc_1_1RealAttribute.xhtml)

Provide a class for a real-valued attribute.

**Definition** [Attribute.hpp:23](Attribute_8hpp_source.xhtml#l00023)



[sysc::RealAttribute::RealAttribute](classsysc_1_1RealAttribute.xhtml#ad46b89c811a79901af549e50173ca5f8)

RealAttribute(AttributeName name, double value, Dimensionality dimensionality)

Provide a constructor for the RealAttribute class.



[sysc::AttributeName](group__SystemCouplingParticipantAPIs.xhtml#gadb06eacf4ed0787d18e8ddbf0612c83c)

std::string AttributeName

**Definition** [CommonTypes.hpp:235](CommonTypes_8hpp_source.xhtml#l00235)



[sysc::Dimensionality](structsysc_1_1Dimensionality.xhtml)

Provide a structure for dimensionality.

**Definition** [CommonSettings.hpp:76](CommonSettings_8hpp_source.xhtml#l00076)