    

 ## On this page

  

 

 # Attribute

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

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

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

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

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

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

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

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

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

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

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

<a name="l00051"></a>[ 51](classsysc_1_1RealAttribute.xhtml#a5fc9075ddc9f02df2fba129abdddfe85) [RealAttribute](classsysc_1_1RealAttribute.xhtml#a5fc9075ddc9f02df2fba129abdddfe85)(

<a name="l00052"></a> 52 [AttributeName](group__SystemCouplingParticipantAPIs.xhtml#gadb06eacf4ed0787d18e8ddbf0612c83c) name,

<a name="l00053"></a> 53 double value,

<a name="l00054"></a> 54 [Dimensionality](structsysc_1_1Dimensionality.xhtml) dimensionality,

<a name="l00055"></a> 55 bool modifiable);

<a name="l00056"></a> 56 

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

<a name="l00058"></a> 58 

<a name="l00059"></a> 59 double getValue() const noexcept;

<a name="l00060"></a> 60 

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

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

<a name="l00063"></a> 63 bool isModifiable() const noexcept;

<a name="l00064"></a> 64 

<a name="l00065"></a> 65 std::string getUnits() const;

<a name="l00066"></a> 66 

<a name="l00067"></a> 67 private:

<a name="l00068"></a> 68 [AttributeName](group__SystemCouplingParticipantAPIs.xhtml#gadb06eacf4ed0787d18e8ddbf0612c83c) m_name;

<a name="l00069"></a> 69 double m_value{0.0};

<a name="l00070"></a> 70 [Dimensionality](structsysc_1_1Dimensionality.xhtml) m_dimensionality;

<a name="l00071"></a> 71 bool m_modifiable{true};

<a name="l00072"></a> 72 };

<a name="l00073"></a> 73 

<a name="l00082"></a>[ 82](classsysc_1_1IntegerAttribute.xhtml) class SYSTEM_COUPLING_PARTICIPANT_DLL [IntegerAttribute](classsysc_1_1IntegerAttribute.xhtml) {

<a name="l00083"></a> 83 public:

<a name="l00092"></a>[ 92](classsysc_1_1IntegerAttribute.xhtml#afb0787aba682b1564ca5b23d506b264c) [IntegerAttribute](classsysc_1_1IntegerAttribute.xhtml#afb0787aba682b1564ca5b23d506b264c)(

<a name="l00093"></a> 93 [AttributeName](group__SystemCouplingParticipantAPIs.xhtml#gadb06eacf4ed0787d18e8ddbf0612c83c) name,

<a name="l00094"></a> 94 std::int64_t value);

<a name="l00095"></a> 95 

<a name="l00105"></a>[ 105](classsysc_1_1IntegerAttribute.xhtml#a18a6abf9327ed02ca9c683a7405514d4) [IntegerAttribute](classsysc_1_1IntegerAttribute.xhtml#a18a6abf9327ed02ca9c683a7405514d4)(

<a name="l00106"></a> 106 [AttributeName](group__SystemCouplingParticipantAPIs.xhtml#gadb06eacf4ed0787d18e8ddbf0612c83c) name,

<a name="l00107"></a> 107 std::int64_t value,

<a name="l00108"></a> 108 bool modifiable);

<a name="l00109"></a> 109 

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

<a name="l00111"></a> 111 

<a name="l00112"></a> 112 std::int64_t getValue() const noexcept;

<a name="l00113"></a> 113 

<a name="l00114"></a> 114 bool isModifiable() const noexcept;

<a name="l00115"></a> 115 

<a name="l00116"></a> 116 private:

<a name="l00117"></a> 117 [AttributeName](group__SystemCouplingParticipantAPIs.xhtml#gadb06eacf4ed0787d18e8ddbf0612c83c) m_name;

<a name="l00118"></a> 118 std::int64_t m_value{0};

<a name="l00119"></a> 119 bool m_modifiable{true};

<a name="l00120"></a> 120 };

<a name="l00121"></a> 121 

<a name="l00122"></a> 122 } // namespace sysc

[sysc::IntegerAttribute](classsysc_1_1IntegerAttribute.xhtml)

Provide a class for an integer-valued attribute.

**Definition:** [Attribute.hpp:82](Attribute_8hpp_source.xhtml#l00082)



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

IntegerAttribute(AttributeName name, std::int64_t value, bool modifiable)

Provide a constructor for the IntegerAttribute class.



[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#a5fc9075ddc9f02df2fba129abdddfe85)

RealAttribute(AttributeName name, double value, Dimensionality dimensionality, bool modifiable)

Provide a constructor for the RealAttribute class.



[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:237](CommonTypes_8hpp_source.xhtml#l00237)



[sysc::Dimensionality](structsysc_1_1Dimensionality.xhtml)

Provide a structure for dimensionality.

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