Skip to content
This repository was archived by the owner on Nov 26, 2025. It is now read-only.

Commit 4af51dc

Browse files
committed
logical: add csharp attributes to technical space properties
text.cpp: move features to logical model
1 parent 02d1a20 commit 4af51dc

10 files changed

Lines changed: 185 additions & 88 deletions

File tree

projects/dogen.logical/include/dogen.logical/types/entities/structural/technical_space_properties.hpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ class technical_space_properties final {
4242
technical_space_properties(
4343
const bool requires_manual_default_constructor,
4444
const bool requires_manual_move_constructor,
45-
const bool requires_stream_manipulators);
45+
const bool requires_stream_manipulators,
46+
const bool is_floating_point,
47+
const bool requires_static_reference_equals);
4648

4749
public:
4850
bool requires_manual_default_constructor() const;
@@ -54,6 +56,12 @@ class technical_space_properties final {
5456
bool requires_stream_manipulators() const;
5557
void requires_stream_manipulators(const bool v);
5658

59+
bool is_floating_point() const;
60+
void is_floating_point(const bool v);
61+
62+
bool requires_static_reference_equals() const;
63+
void requires_static_reference_equals(const bool v);
64+
5765
public:
5866
bool operator==(const technical_space_properties& rhs) const;
5967
bool operator!=(const technical_space_properties& rhs) const {
@@ -68,6 +76,8 @@ class technical_space_properties final {
6876
bool requires_manual_default_constructor_;
6977
bool requires_manual_move_constructor_;
7078
bool requires_stream_manipulators_;
79+
bool is_floating_point_;
80+
bool requires_static_reference_equals_;
7181
};
7282

7383
}

projects/dogen.logical/include/dogen.logical/types/features/technical_space_properties.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class technical_space_properties final {
3838
variability::entities::feature requires_manual_default_constructor;
3939
variability::entities::feature requires_manual_move_constructor;
4040
variability::entities::feature requires_stream_manipulators;
41+
variability::entities::feature requires_static_reference_equals;
4142
};
4243

4344
static feature_group
@@ -48,11 +49,13 @@ class technical_space_properties final {
4849
bool requires_manual_default_constructor;
4950
bool requires_manual_move_constructor;
5051
bool requires_stream_manipulators;
52+
bool requires_static_reference_equals;
5153

5254
static_configuration() :
5355
requires_manual_default_constructor(),
5456
requires_manual_move_constructor(),
55-
requires_stream_manipulators() {}
57+
requires_stream_manipulators(),
58+
requires_static_reference_equals() {}
5659
};
5760

5861
static static_configuration make_static_configuration(

projects/dogen.logical/src/io/entities/structural/technical_space_properties_io.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ std::ostream& operator<<(std::ostream& s, const technical_space_properties& v) {
3535
<< "\"__type__\": " << "\"dogen::logical::entities::structural::technical_space_properties\"" << ", "
3636
<< "\"requires_manual_default_constructor\": " << v.requires_manual_default_constructor() << ", "
3737
<< "\"requires_manual_move_constructor\": " << v.requires_manual_move_constructor() << ", "
38-
<< "\"requires_stream_manipulators\": " << v.requires_stream_manipulators()
38+
<< "\"requires_stream_manipulators\": " << v.requires_stream_manipulators() << ", "
39+
<< "\"is_floating_point\": " << v.is_floating_point() << ", "
40+
<< "\"requires_static_reference_equals\": " << v.requires_static_reference_equals()
3941
<< " }";
4042
return(s);
4143
}

projects/dogen.logical/src/types/entities/structural/technical_space_properties.cpp

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,27 +25,37 @@ namespace dogen::logical::entities::structural {
2525
technical_space_properties::technical_space_properties()
2626
: requires_manual_default_constructor_(static_cast<bool>(0)),
2727
requires_manual_move_constructor_(static_cast<bool>(0)),
28-
requires_stream_manipulators_(static_cast<bool>(0)) { }
28+
requires_stream_manipulators_(static_cast<bool>(0)),
29+
is_floating_point_(static_cast<bool>(0)),
30+
requires_static_reference_equals_(static_cast<bool>(0)) { }
2931

3032
technical_space_properties::technical_space_properties(
3133
const bool requires_manual_default_constructor,
3234
const bool requires_manual_move_constructor,
33-
const bool requires_stream_manipulators)
35+
const bool requires_stream_manipulators,
36+
const bool is_floating_point,
37+
const bool requires_static_reference_equals)
3438
: requires_manual_default_constructor_(requires_manual_default_constructor),
3539
requires_manual_move_constructor_(requires_manual_move_constructor),
36-
requires_stream_manipulators_(requires_stream_manipulators) { }
40+
requires_stream_manipulators_(requires_stream_manipulators),
41+
is_floating_point_(is_floating_point),
42+
requires_static_reference_equals_(requires_static_reference_equals) { }
3743

3844
void technical_space_properties::swap(technical_space_properties& other) noexcept {
3945
using std::swap;
4046
swap(requires_manual_default_constructor_, other.requires_manual_default_constructor_);
4147
swap(requires_manual_move_constructor_, other.requires_manual_move_constructor_);
4248
swap(requires_stream_manipulators_, other.requires_stream_manipulators_);
49+
swap(is_floating_point_, other.is_floating_point_);
50+
swap(requires_static_reference_equals_, other.requires_static_reference_equals_);
4351
}
4452

4553
bool technical_space_properties::operator==(const technical_space_properties& rhs) const {
4654
return requires_manual_default_constructor_ == rhs.requires_manual_default_constructor_ &&
4755
requires_manual_move_constructor_ == rhs.requires_manual_move_constructor_ &&
48-
requires_stream_manipulators_ == rhs.requires_stream_manipulators_;
56+
requires_stream_manipulators_ == rhs.requires_stream_manipulators_ &&
57+
is_floating_point_ == rhs.is_floating_point_ &&
58+
requires_static_reference_equals_ == rhs.requires_static_reference_equals_;
4959
}
5060

5161
technical_space_properties& technical_space_properties::operator=(technical_space_properties other) {
@@ -78,4 +88,20 @@ void technical_space_properties::requires_stream_manipulators(const bool v) {
7888
requires_stream_manipulators_ = v;
7989
}
8090

91+
bool technical_space_properties::is_floating_point() const {
92+
return is_floating_point_;
93+
}
94+
95+
void technical_space_properties::is_floating_point(const bool v) {
96+
is_floating_point_ = v;
97+
}
98+
99+
bool technical_space_properties::requires_static_reference_equals() const {
100+
return requires_static_reference_equals_;
101+
}
102+
103+
void technical_space_properties::requires_static_reference_equals(const bool v) {
104+
requires_static_reference_equals_ = v;
105+
}
106+
81107
}

projects/dogen.logical/src/types/features/technical_space_properties.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,22 @@ make_masd_cpp_aspect_requires_stream_manipulators() {
7878
return r;
7979
}
8080

81+
dogen::variability::entities::feature
82+
make_masd_csharp_aspect_requires_static_reference_equals() {
83+
using namespace dogen::variability::entities;
84+
feature r;
85+
r.name().simple("requires_static_reference_equals");
86+
r.name().qualified("masd.csharp.aspect.requires_static_reference_equals");
87+
r.description(R"(
88+
)");
89+
const auto vt(value_type::boolean);
90+
r.value_type(vt);
91+
r.binding_point(binding_point::element);
92+
dogen::variability::helpers::value_factory f;
93+
r.default_value(f.make(vt, std::list<std::string>{ "true" }));
94+
return r;
95+
}
96+
8197
}
8298

8399
technical_space_properties::feature_group
@@ -88,6 +104,7 @@ technical_space_properties::make_feature_group(const dogen::variability::entitie
88104
r.requires_manual_default_constructor = s.get_by_name("masd.cpp.aspect.requires_manual_default_constructor");
89105
r.requires_manual_move_constructor = s.get_by_name("masd.cpp.aspect.requires_manual_move_constructor");
90106
r.requires_stream_manipulators = s.get_by_name("masd.cpp.aspect.requires_stream_manipulators");
107+
r.requires_static_reference_equals = s.get_by_name("masd.csharp.aspect.requires_static_reference_equals");
91108

92109
return r;
93110
}
@@ -101,6 +118,7 @@ technical_space_properties::static_configuration technical_space_properties::mak
101118
r.requires_manual_default_constructor = s.get_boolean_content_or_default(fg.requires_manual_default_constructor);
102119
r.requires_manual_move_constructor = s.get_boolean_content_or_default(fg.requires_manual_move_constructor);
103120
r.requires_stream_manipulators = s.get_boolean_content_or_default(fg.requires_stream_manipulators);
121+
r.requires_static_reference_equals = s.get_boolean_content_or_default(fg.requires_static_reference_equals);
104122
return r;
105123
}
106124

@@ -111,6 +129,7 @@ technical_space_properties::make_features() {
111129
r.push_back(make_masd_cpp_aspect_requires_manual_default_constructor());
112130
r.push_back(make_masd_cpp_aspect_requires_manual_move_constructor());
113131
r.push_back(make_masd_cpp_aspect_requires_stream_manipulators());
132+
r.push_back(make_masd_csharp_aspect_requires_static_reference_equals());
114133
return r;
115134
}
116135

0 commit comments

Comments
 (0)