Skip to content
Snippets Groups Projects
Commit 21e6965c authored by Ludovic Apvrille's avatar Ludovic Apvrille
Browse files

TEPE: Support of property connector in TEPE data structure from the graphical form

parent a8e142ce
No related branches found
No related tags found
No related merge requests found
......@@ -200,5 +200,42 @@ public abstract class TEPEComponent {
}
}
public void addInSignalComponent(TEPEComponent _tepec) {
if (inSignalComponents != null) {
inSignalComponents.add(_tepec);
}
}
public void addInNegatedSignalComponent(TEPEComponent _tepec) {
if (inNegatedSignalComponents != null) {
inNegatedSignalComponents.add(_tepec);
}
}
public void addOutSignalComponent(TEPEComponent _tepec) {
if (outSignalComponents != null) {
outSignalComponents.add(_tepec);
}
}
public void addInPropertyComponent(TEPEComponent _tepec) {
if (inPropertyComponents != null) {
inPropertyComponents.add(_tepec);
}
}
public void addInNegatedPropertyComponent(TEPEComponent _tepec) {
if (inNegatedPropertyComponents != null) {
inNegatedPropertyComponents.add(_tepec);
}
}
public void addOutPropertyComponent(TEPEComponent _tepec) {
if (outPropertyComponents != null) {
outPropertyComponents.add(_tepec);
}
}
}
......@@ -232,6 +232,27 @@ public class AvatarRequirementPanelTranslator {
element2.addInAttributeComponent(element1);
}
}
} else if (tgc instanceof AvatarPDPropertyConnector) {
AvatarPDPropertyConnector apdpco = (AvatarPDPropertyConnector)tgc;
tgc1 = _apdp.getComponentToWhichBelongs(apdpco.getTGConnectingPointP1());
tgc2 = _apdp.getComponentToWhichBelongs(apdpco.getTGConnectingPointP2());
if ((tgc1 == null) || (tgc2 == null)) {
TraceManager.addDev("Tgcs null in Avatar translation");
} else {
element1 = (TEPEComponent)(listE.getObject(tgc1));
element2 = (TEPEComponent)(listE.getObject(tgc2));
if ((element1 != null) && (element2 != null)) {
TraceManager.addDev("Adding output / input");
element1.addOutAttributeComponent(element2);
// Must know whether it is negated, or not
if (apdpco.isNegated()) {
element2.addInNegatedPropertyComponent(element1);
} else {
element2.addInPropertyComponent(element1);
}
}
}
}
}
}
......
......@@ -198,6 +198,13 @@ public class AvatarPDPropertyConnector extends TGConnector implements ScalableT
oldScaleFactor = scaleFactor;
}
public boolean isNegated() {
if (value.compareTo("not") == 0) {
return true;
}
return false;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment