Skip to main content

System Coupling C++ library 2024 R1

Attribute

Last update: 17.07.2025
1/*
2 * Copyright ANSYS, Inc. Unauthorized use, distribution, or duplication is prohibited.
3 */
4
5#pragma once
6
7#include "SystemCouplingParticipant/LibraryType.hpp"
8
9#include "SystemCouplingParticipant/CommonTypes.hpp"
10
11#include <cstdint>
12
13namespace sysc {
14
23class SYSTEM_COUPLING_PARTICIPANT_DLL RealAttribute {
24public:
35 AttributeName name,
36 double value,
37 Dimensionality dimensionality);
38
39 const AttributeName& getName() const noexcept;
40
41 double getValue() const noexcept;
42
43 const Dimensionality& getDimensionality() const noexcept;
44
45 std::string getUnits() const;
46
47private:
48 AttributeName m_name;
49 double m_value{0.0};
50 Dimensionality m_dimensionality;
51};
52
61class SYSTEM_COUPLING_PARTICIPANT_DLL IntegerAttribute {
62public:
72 AttributeName name,
73 std::int64_t value);
74
75 const AttributeName& getName() const noexcept;
76
77 std::int64_t getValue() const noexcept;
78
79private:
80 AttributeName m_name;
81 std::int64_t m_value{0};
82};
83
84} // namespace sysc
Provide a class for an integer-valued attribute.
Definition Attribute.hpp:61
IntegerAttribute(AttributeName name, std::int64_t value)
Provide a constructor for the IntegerAttribute class.
Provide a class for a real-valued attribute.
Definition Attribute.hpp:23
RealAttribute(AttributeName name, double value, Dimensionality dimensionality)
Provide a constructor for the RealAttribute class.
std::string AttributeName
Provide a structure for dimensionality.

Connect with Ansys