Skip to content
Snippets Groups Projects
Commit 8ae17152 authored by Sophie Coudert's avatar Sophie Coudert
Browse files

details

parent f755a7d9
No related branches found
No related tags found
4 merge requests!504merge first stable version of Avatar-SysML V2,!503merge the first stable version of the Avatar-SysML parser/generator,!501Avatar sys ml 04 2024,!498Avatar sys ml 04 2024 (first merge request, only for verification)
...@@ -260,7 +260,7 @@ public class AvatarFromSysML { ...@@ -260,7 +260,7 @@ public class AvatarFromSysML {
for(int j = 0; j < tsize; j++) { for(int j = 0; j < tsize; j++) {
aa = new AvatarAttribute( aa = new AvatarAttribute(
a.getName() + "__" + adt.getFieldString(j), a.getName() + "__" + adt.getFieldString(j),
(adt.getFieldStringType(j) == AvatarType.BOOLEAN ? AvatarType.BOOLEAN : AvatarType.INTEGER), adt.getFieldStringType(j),
theBlock, null); theBlock, null);
theBlock.addAttribute(aa); theBlock.addAttribute(aa);
aa.setAsConstant(true); aa.setAsConstant(true);
...@@ -292,7 +292,7 @@ public class AvatarFromSysML { ...@@ -292,7 +292,7 @@ public class AvatarFromSysML {
AvatarDataType adt = avSpec.getDataTypeByName(returnType); AvatarDataType adt = avSpec.getDataTypeByName(returnType);
int nbFields = adt.getAttributeNb(); int nbFields = adt.getAttributeNb();
for (int j = 0; j < nbFields; j++) { for (int j = 0; j < nbFields; j++) {
AvatarType type = (adt.getFieldStringType(j) == AvatarType.INTEGER ? AvatarType.INTEGER : AvatarType.BOOLEAN); AvatarType type = adt.getFieldStringType(j);
am.addReturnParameter(new AvatarAttribute("return__" + j, type, theBlock, null)); am.addReturnParameter(new AvatarAttribute("return__" + j, type, theBlock, null));
} }
} }
...@@ -473,7 +473,7 @@ public class AvatarFromSysML { ...@@ -473,7 +473,7 @@ public class AvatarFromSysML {
for(int j = 0; j < tsize; j++) { for(int j = 0; j < tsize; j++) {
aa = new AvatarAttribute( aa = new AvatarAttribute(
ss.getFieldName(i) + "__" + adt.getFieldString(j), ss.getFieldName(i) + "__" + adt.getFieldString(j),
(adt.getFieldStringType(j) == AvatarType.BOOLEAN ? AvatarType.BOOLEAN : AvatarType.INTEGER), adt.getFieldStringType(j),
b, null); b, null);
am.addParameter(aa); am.addParameter(aa);
aa.setAsConstant(false); aa.setAsConstant(false);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment