summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClément DAVID <clement.david@scilab-enterprises.com>2016-12-09 12:35:11 +0100
committerClément DAVID <clement.david@scilab-enterprises.com>2016-12-20 10:56:27 +0100
commite2c10910653284ffc44dcfd363fc6caa64d0117e (patch)
tree2dd4e424eab5c57662b6174a7bce57f8bbdecd23
parent3e94526edde954753ebe5ec5188b5fc914527acc (diff)
downloadscilab-e2c10910653284ffc44dcfd363fc6caa64d0117e.zip
scilab-e2c10910653284ffc44dcfd363fc6caa64d0117e.tar.gz
Xcos ecore: fix datatype definition
The previous datatype definition was not fully decoded as the Model enforce int[3] values and we decoded and set them int by int. The new definition is also clearer from external users (type rows columns). Change-Id: I96cf427c878fdbae63a73f28ef25dfa28137e15f
-rw-r--r--scilab/modules/scicos/includes/XMIResource.hxx5
-rw-r--r--scilab/modules/scicos/src/cpp/XMIResource_load.cpp45
-rw-r--r--scilab/modules/scicos/src/cpp/XMIResource_save.cpp52
-rw-r--r--scilab/modules/xcos/model/Xcos.genmodel10
-rw-r--r--scilab/modules/xcos/model/Xcos.xcore176
-rw-r--r--scilab/modules/xcos/model/xcos.ecore16
6 files changed, 104 insertions, 200 deletions
diff --git a/scilab/modules/scicos/includes/XMIResource.hxx b/scilab/modules/scicos/includes/XMIResource.hxx
index ed86e7f..488ef69 100644
--- a/scilab/modules/scicos/includes/XMIResource.hxx
+++ b/scilab/modules/scicos/includes/XMIResource.hxx
@@ -43,7 +43,7 @@ private:
43 /* 43 /*
44 * Save helpers 44 * Save helpers
45 */ 45 */
46 46 int writeDatatype(xmlTextWriterPtr writer, const std::vector<int>& datatype);
47 int writePoint(xmlTextWriterPtr writer, double x, double y); 47 int writePoint(xmlTextWriterPtr writer, double x, double y);
48 int writeGeometry(xmlTextWriterPtr writer, ScicosID id, kind_t kind); 48 int writeGeometry(xmlTextWriterPtr writer, ScicosID id, kind_t kind);
49 int writeAbstractLayer(xmlTextWriterPtr writer, ScicosID id, kind_t kind); 49 int writeAbstractLayer(xmlTextWriterPtr writer, ScicosID id, kind_t kind);
@@ -63,6 +63,7 @@ private:
63 int loadStringArray(xmlTextReaderPtr reader, enum object_properties_t property, const model::BaseObject& o); 63 int loadStringArray(xmlTextReaderPtr reader, enum object_properties_t property, const model::BaseObject& o);
64 int loadEncodedStringArray(xmlTextReaderPtr reader, enum object_properties_t property, const model::BaseObject& o); 64 int loadEncodedStringArray(xmlTextReaderPtr reader, enum object_properties_t property, const model::BaseObject& o);
65 int loadBase64(xmlTextReaderPtr reader, enum object_properties_t property, const model::BaseObject& o); 65 int loadBase64(xmlTextReaderPtr reader, enum object_properties_t property, const model::BaseObject& o);
66 int loadDatatype(xmlTextReaderPtr reader, const model::BaseObject& o);
66 int loadPoint(xmlTextReaderPtr reader, const model::BaseObject& o); 67 int loadPoint(xmlTextReaderPtr reader, const model::BaseObject& o);
67 int loadGeometry(xmlTextReaderPtr reader, const model::BaseObject& o); 68 int loadGeometry(xmlTextReaderPtr reader, const model::BaseObject& o);
68 int loadAbstractBaseObject(xmlTextReaderPtr reader, const model::BaseObject& o); 69 int loadAbstractBaseObject(xmlTextReaderPtr reader, const model::BaseObject& o);
@@ -108,6 +109,7 @@ private:
108 e_blocktype, 109 e_blocktype,
109 e_child, 110 e_child,
110 e_color, 111 e_color,
112 e_columns,
111 e_connectedSignal, 113 e_connectedSignal,
112 e_context, 114 e_context,
113 e_controlPoint, 115 e_controlPoint,
@@ -152,6 +154,7 @@ private:
152 e_properties, 154 e_properties,
153 e_realtimeScale, 155 e_realtimeScale,
154 e_relativeTolerance, 156 e_relativeTolerance,
157 e_rows,
155 e_rpar, 158 e_rpar,
156 e_solver, 159 e_solver,
157 e_sourceBlock, 160 e_sourceBlock,
diff --git a/scilab/modules/scicos/src/cpp/XMIResource_load.cpp b/scilab/modules/scicos/src/cpp/XMIResource_load.cpp
index 14ef65c..042490d 100644
--- a/scilab/modules/scicos/src/cpp/XMIResource_load.cpp
+++ b/scilab/modules/scicos/src/cpp/XMIResource_load.cpp
@@ -99,6 +99,7 @@ int XMIResource::load(const char* uri)
99 constXcosNames[e_blocktype] = xmlTextReaderConstString(reader, BAD_CAST ("blocktype")); 99 constXcosNames[e_blocktype] = xmlTextReaderConstString(reader, BAD_CAST ("blocktype"));
100 constXcosNames[e_child] = xmlTextReaderConstString(reader, BAD_CAST ("child")); 100 constXcosNames[e_child] = xmlTextReaderConstString(reader, BAD_CAST ("child"));
101 constXcosNames[e_color] = xmlTextReaderConstString(reader, BAD_CAST ("color")); 101 constXcosNames[e_color] = xmlTextReaderConstString(reader, BAD_CAST ("color"));
102 constXcosNames[e_columns] = xmlTextReaderConstString(reader, BAD_CAST ("columns"));
102 constXcosNames[e_connectedSignal] = xmlTextReaderConstString(reader, BAD_CAST ("connectedSignal")); 103 constXcosNames[e_connectedSignal] = xmlTextReaderConstString(reader, BAD_CAST ("connectedSignal"));
103 constXcosNames[e_context] = xmlTextReaderConstString(reader, BAD_CAST ("context")); 104 constXcosNames[e_context] = xmlTextReaderConstString(reader, BAD_CAST ("context"));
104 constXcosNames[e_controlPoint] = xmlTextReaderConstString(reader, BAD_CAST ("controlPoint")); 105 constXcosNames[e_controlPoint] = xmlTextReaderConstString(reader, BAD_CAST ("controlPoint"));
@@ -143,6 +144,7 @@ int XMIResource::load(const char* uri)
143 constXcosNames[e_properties] = xmlTextReaderConstString(reader, BAD_CAST ("properties")); 144 constXcosNames[e_properties] = xmlTextReaderConstString(reader, BAD_CAST ("properties"));
144 constXcosNames[e_realtimeScale] = xmlTextReaderConstString(reader, BAD_CAST ("realtimeScale")); 145 constXcosNames[e_realtimeScale] = xmlTextReaderConstString(reader, BAD_CAST ("realtimeScale"));
145 constXcosNames[e_relativeTolerance] = xmlTextReaderConstString(reader, BAD_CAST ("relativeTolerance")); 146 constXcosNames[e_relativeTolerance] = xmlTextReaderConstString(reader, BAD_CAST ("relativeTolerance"));
147 constXcosNames[e_rows] = xmlTextReaderConstString(reader, BAD_CAST ("rows"));
146 constXcosNames[e_rpar] = xmlTextReaderConstString(reader, BAD_CAST ("rpar")); 148 constXcosNames[e_rpar] = xmlTextReaderConstString(reader, BAD_CAST ("rpar"));
147 constXcosNames[e_solver] = xmlTextReaderConstString(reader, BAD_CAST ("solver")); 149 constXcosNames[e_solver] = xmlTextReaderConstString(reader, BAD_CAST ("solver"));
148 constXcosNames[e_sourceBlock] = xmlTextReaderConstString(reader, BAD_CAST ("sourceBlock")); 150 constXcosNames[e_sourceBlock] = xmlTextReaderConstString(reader, BAD_CAST ("sourceBlock"));
@@ -455,6 +457,40 @@ int XMIResource::loadBase64(xmlTextReaderPtr reader, enum object_properties_t pr
455 return 1; 457 return 1;
456} 458}
457 459
460int XMIResource::loadDatatype(xmlTextReaderPtr reader, const model::BaseObject& o)
461{
462 assert(o.kind() == PORT);
463
464 std::vector<int> datatype;
465 controller.getObjectProperty(o.id(), o.kind(), DATATYPE, datatype);
466
467 // iterate on attributes
468 for (int rc = xmlTextReaderMoveToFirstAttribute(reader); rc > 0; rc = xmlTextReaderMoveToNextAttribute(reader))
469 {
470 auto found = std::find(constXcosNames.begin(), constXcosNames.end(), xmlTextReaderConstName(reader));
471 enum xcosNames current = static_cast<enum xcosNames>(std::distance(constXcosNames.begin(), found));
472 switch (current)
473 {
474 case e_type:
475 datatype[2] = to_double(xmlTextReaderConstValue(reader));
476 break;
477 case e_rows:
478 datatype[0] = to_double(xmlTextReaderConstValue(reader));
479 break;
480 case e_columns:
481 datatype[1] = to_double(xmlTextReaderConstValue(reader));
482 break;
483 default:
484 // ignore other parameters
485 // TODO: Does other metamodels might be managed there ?
486 break;
487 }
488 }
489
490 controller.setObjectProperty(o.id(), o.kind(), DATATYPE, datatype);
491 return 1;
492}
493
458int XMIResource::loadPoint(xmlTextReaderPtr reader, const model::BaseObject& o) 494int XMIResource::loadPoint(xmlTextReaderPtr reader, const model::BaseObject& o)
459{ 495{
460 assert(o.kind() == LINK); 496 assert(o.kind() == LINK);
@@ -757,8 +793,6 @@ int XMIResource::loadPort(xmlTextReaderPtr reader, const model::BaseObject& o)
757 case e_sourceBlock: 793 case e_sourceBlock:
758 { 794 {
759 // not lookup needed thanks to the XML hierarchy 795 // not lookup needed thanks to the XML hierarchy
760 const model::BaseObject& parent = processed.back();
761 controller.setObjectProperty(o.id(), o.kind(), SOURCE_BLOCK, parent.id());
762 break; 796 break;
763 } 797 }
764 case e_kind: 798 case e_kind:
@@ -1161,6 +1195,7 @@ int XMIResource::processElement(xmlTextReaderPtr reader)
1161 1195
1162 // decode content 1196 // decode content
1163 model::BaseObject child(o, PORT); 1197 model::BaseObject child(o, PORT);
1198 processed.push_back(child);
1164 return loadPort(reader, child); 1199 return loadPort(reader, child);
1165 } 1200 }
1166 case e_geometry: 1201 case e_geometry:
@@ -1242,11 +1277,7 @@ int XMIResource::processElement(xmlTextReaderPtr reader)
1242 return loadSimulationConfig(reader, processed.back()); 1277 return loadSimulationConfig(reader, processed.back());
1243 case e_datatype: 1278 case e_datatype:
1244 // datatype is a Port property 1279 // datatype is a Port property
1245 if (!xmlTextReaderIsEmptyElement(reader)) 1280 return loadDatatype(reader, processed.back());
1246 {
1247 parent = current;
1248 }
1249 return 1;
1250 default: 1281 default:
1251 sciprint("Unknown \"%s\" element name at line %d\n", name, xmlTextReaderGetParserLineNumber(reader) - 1); 1282 sciprint("Unknown \"%s\" element name at line %d\n", name, xmlTextReaderGetParserLineNumber(reader) - 1);
1252 return -1; 1283 return -1;
diff --git a/scilab/modules/scicos/src/cpp/XMIResource_save.cpp b/scilab/modules/scicos/src/cpp/XMIResource_save.cpp
index 8412bed..c7ca3db 100644
--- a/scilab/modules/scicos/src/cpp/XMIResource_save.cpp
+++ b/scilab/modules/scicos/src/cpp/XMIResource_save.cpp
@@ -165,12 +165,47 @@ static int writeBase64(xmlTextWriterPtr writer, const char* name, const std::vec
165 return status; 165 return status;
166} 166}
167 167
168int XMIResource::writeDatatype(xmlTextWriterPtr writer, const std::vector<int>& datatype)
169{
170 int status;
171
172 status = xmlTextWriterStartElement(writer, BAD_CAST("datatype"));
173 if (status == -1)
174 {
175 return status;
176 }
177
178 status = xmlTextWriterWriteAttribute(writer, BAD_CAST("type"), BAD_CAST(to_string(datatype[2]).c_str()));
179 if (status == -1)
180 {
181 return status;
182 }
183
184 status = xmlTextWriterWriteAttribute(writer, BAD_CAST("rows"), BAD_CAST(to_string(datatype[0]).c_str()));
185 if (status == -1)
186 {
187 return status;
188 }
189
190 status = xmlTextWriterWriteAttribute(writer, BAD_CAST("columns"), BAD_CAST(to_string(datatype[1]).c_str()));
191 if (status == -1)
192 {
193 return status;
194 }
195
196 status = xmlTextWriterEndElement(writer);
197 if (status == -1)
198 {
199 return status;
200 }
201
202 return status;
203}
168 204
169int XMIResource::writePoint(xmlTextWriterPtr writer, double x, double y) 205int XMIResource::writePoint(xmlTextWriterPtr writer, double x, double y)
170{ 206{
171 int status; 207 int status;
172 208
173
174 status = xmlTextWriterStartElement(writer, BAD_CAST("controlPoint")); 209 status = xmlTextWriterStartElement(writer, BAD_CAST("controlPoint"));
175 if (status == -1) 210 if (status == -1)
176 { 211 {
@@ -359,7 +394,7 @@ int XMIResource::writeDiagram(xmlTextWriterPtr writer)
359 { 394 {
360 return status; 395 return status;
361 } 396 }
362 status = xmlTextWriterWriteAttributeNS(writer, BAD_CAST("xsi"), BAD_CAST("schemaLocation"), BAD_CAST("http://www.w3.org/2001/XMLSchema-instance"), BAD_CAST("org.scilab.modules.xcos Xcos.xcore#/EPackage")); 397 status = xmlTextWriterWriteAttributeNS(writer, BAD_CAST("xsi"), BAD_CAST("schemaLocation"), BAD_CAST("http://www.w3.org/2001/XMLSchema-instance"), BAD_CAST("org.scilab.modules.xcos xcos.ecore"));
363 if (status == -1) 398 if (status == -1)
364 { 399 {
365 return status; 400 return status;
@@ -917,16 +952,9 @@ int XMIResource::writePort(xmlTextWriterPtr writer, enum object_properties_t con
917 return status; 952 return status;
918 } 953 }
919 954
920 std::vector<double> doubleArrayValue; 955 std::vector<int> intArrayValue;
921 controller.getObjectProperty(id, BLOCK, DATATYPE, doubleArrayValue); 956 controller.getObjectProperty(id, PORT, DATATYPE, intArrayValue);
922 for (double d : doubleArrayValue) 957 status = writeDatatype(writer, intArrayValue);
923 {
924 status = xmlTextWriterWriteElement(writer, BAD_CAST("datatype"), BAD_CAST(to_string(d).c_str()));
925 if (status == -1)
926 {
927 return status;
928 }
929 }
930 958
931 status = xmlTextWriterEndElement(writer); 959 status = xmlTextWriterEndElement(writer);
932 if (status == -1) 960 if (status == -1)
diff --git a/scilab/modules/xcos/model/Xcos.genmodel b/scilab/modules/xcos/model/Xcos.genmodel
index 2370b76..a01ecbd 100644
--- a/scilab/modules/xcos/model/Xcos.genmodel
+++ b/scilab/modules/xcos/model/Xcos.genmodel
@@ -2,7 +2,7 @@
2<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" 2<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
3 xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/xcos/src" modelPluginID="xcos" runtimeJar="true" 3 xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/xcos/src" modelPluginID="xcos" runtimeJar="true"
4 modelName="Xcos" updateClasspath="false" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" 4 modelName="Xcos" updateClasspath="false" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container"
5 testsDirectory="" booleanFlagsField="eFlags" booleanFlagsReservedBits="8" importerID="org.eclipse.emf.ecore.xcore.importer" 5 testsDirectory="" booleanFlagsField="eFlags" booleanFlagsReservedBits="8" importerID="org.eclipse.emf.importer.ecore"
6 containmentProxies="true" complianceLevel="8.0" language="en" usedGenPackages="../../../org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore" 6 containmentProxies="true" complianceLevel="8.0" language="en" usedGenPackages="../../../org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore"
7 operationReflection="true" importOrganizing="true" decoration="Live" oSGiCompatible="true"> 7 operationReflection="true" importOrganizing="true" decoration="Live" oSGiCompatible="true">
8 <genAnnotations source="http://www.eclipse.org/emf/2002/GenModel/exporter/org.eclipse.xsd.ecore.exporter"> 8 <genAnnotations source="http://www.eclipse.org/emf/2002/GenModel/exporter/org.eclipse.xsd.ecore.exporter">
@@ -17,7 +17,7 @@
17 </genAnnotations> 17 </genAnnotations>
18 <details key="directoryURI" value="."/> 18 <details key="directoryURI" value="."/>
19 </genAnnotations> 19 </genAnnotations>
20 <foreignModel>Xcos.xcore</foreignModel> 20 <foreignModel>xcos.ecore</foreignModel>
21 <modelPluginVariables>org.eclipse.xtext.xbase.lib</modelPluginVariables> 21 <modelPluginVariables>org.eclipse.xtext.xbase.lib</modelPluginVariables>
22 <modelPluginVariables>org.eclipse.emf.ecore.xcore.lib</modelPluginVariables> 22 <modelPluginVariables>org.eclipse.emf.ecore.xcore.lib</modelPluginVariables>
23 <genPackages prefix="Xcos" basePackage="org.scilab.modules" disposableProviderFactory="true" 23 <genPackages prefix="Xcos" basePackage="org.scilab.modules" disposableProviderFactory="true"
@@ -59,6 +59,7 @@
59 </genClasses> 59 </genClasses>
60 <genClasses ecoreClass="xcos.ecore#//SimulationConfig"> 60 <genClasses ecoreClass="xcos.ecore#//SimulationConfig">
61 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute xcos.ecore#//SimulationConfig/finalTime"/> 61 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute xcos.ecore#//SimulationConfig/finalTime"/>
62 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute xcos.ecore#//SimulationConfig/absoluteTime"/>
62 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute xcos.ecore#//SimulationConfig/absoluteTolerance"/> 63 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute xcos.ecore#//SimulationConfig/absoluteTolerance"/>
63 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute xcos.ecore#//SimulationConfig/relativeTolerance"/> 64 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute xcos.ecore#//SimulationConfig/relativeTolerance"/>
64 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute xcos.ecore#//SimulationConfig/timeTolerance"/> 65 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute xcos.ecore#//SimulationConfig/timeTolerance"/>
@@ -124,5 +125,10 @@
124 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute xcos.ecore#//Annotation/style"/> 125 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute xcos.ecore#//Annotation/style"/>
125 </genClasses> 126 </genClasses>
126 <genClasses ecoreClass="xcos.ecore#//CompiledRepresentation"/> 127 <genClasses ecoreClass="xcos.ecore#//CompiledRepresentation"/>
128 <genClasses ecoreClass="xcos.ecore#//Datatype">
129 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute xcos.ecore#//Datatype/typ"/>
130 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute xcos.ecore#//Datatype/rows"/>
131 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute xcos.ecore#//Datatype/columns"/>
132 </genClasses>
127 </genPackages> 133 </genPackages>
128</genmodel:GenModel> 134</genmodel:GenModel>
diff --git a/scilab/modules/xcos/model/Xcos.xcore b/scilab/modules/xcos/model/Xcos.xcore
deleted file mode 100644
index 14bc452..0000000
--- a/scilab/modules/xcos/model/Xcos.xcore
+++ /dev/null
@@ -1,176 +0,0 @@
1package org.scilab.modules.xcos
2
3/* Encoded Scilab values */
4class Binary
5{
6 /* RFC 2045 Base64 encoded double[] values (space separated) */
7 String base64
8}
9
10/* A point is a position on the diagram */
11class Point
12{
13 /* X coordinate */
14 double x
15 /* Y coordinate */
16 double y
17}
18
19/* Rectangular coordinates of the object */
20class Geometry
21{
22 /* X coordinate */
23 double x
24 /* Y coordinate */
25 double y
26 /* Height of the object */
27 double height
28 /* Width of the object */
29 double width
30}
31
32/* The kind of a port */
33enum PortKind
34{
35 in, out, ein, eout
36}
37
38/* Shared definition for both a Diagram and a SuperBlock (eg. a Block) */
39abstract class Layer
40{
41 /* Scilab scripts added at current layer */
42 String[] context
43 /* contained objects */
44 contains BaseObject[] child opposite parent
45}
46
47/* Shared definition for an object contained in a Layer */
48abstract class BaseObject {
49 /* Unique IDentifier : usually on the universally unique identifier (UUID) form */
50 id String uid
51
52 /* The diagram (to ease in memory representation) */
53 refers Diagram[1..1] parentDiagram
54 /* parent Layer to navigate back */
55 container Layer[1..1] parent opposite child
56}
57
58/* A diagram is the top-level object of a model. It contains simulation parameters and the hierarchical data-flow and event-flow graphs. */
59class Diagram extends Layer
60{
61 /* title of a diagram */
62 String title
63 /* Latest saved path */
64 String path
65
66 /* Simulation settings */
67 contains SimulationConfig properties
68 /* Simulation debug level */
69 int debugLevel
70
71 /* Version of the diagram */
72 String version
73}
74
75/* Simulation settings */
76class SimulationConfig
77{
78 /* Simulation final time (starting at 0) */
79 double finalTime
80 double absoluteTolerance
81 double relativeTolerance
82 double timeTolerance
83 double deltaT
84 double realtimeScale
85 double solver
86 double deltaH
87}
88
89/* */
90class Block extends BaseObject, Layer
91{
92 contains Geometry geometry
93 String description
94 String label
95 String style
96
97 String interfaceFunction
98 String[] expression
99 contains Binary exprs
100
101 int[] nzcross
102 int[] nmode
103 contains Binary equations
104
105 String functionName
106 int functionAPI
107 boolean dependsOnU
108 boolean dependsOnT
109 char blocktype
110
111 contains Port[] in
112 contains Port[] out
113 contains Port[] ein
114 contains Port[] eout
115
116 double[] rpar
117 int[] ipar
118 contains Binary opar
119
120 double[] state
121 double[] dstate
122 contains Binary odstate
123}
124
125class Port
126{
127 id String uid
128
129 int[] datatype
130 double firing
131
132 refers Block sourceBlock
133 PortKind kind
134 boolean implicit
135 refers Link connectedSignal
136
137 String style
138 String label
139}
140
141class Link extends BaseObject
142{
143 refers Port sourcePort
144 refers Port destinationPort
145
146 contains Geometry geometry
147 contains Point[] controlPoint
148
149 String style
150 String label
151 double lineWidth
152 double lineHeight
153 int color
154}
155
156class Annotation extends BaseObject
157{
158 contains Geometry geometry
159 String description
160 String font
161 String fontSize
162 String style
163}
164
165/****************************************************************************************
166 * An executable representation can be exported only if the diagram has been "compiled" *
167 ****************************************************************************************/
168
169/*
170 *
171 */
172class CompiledRepresentation
173{
174
175}
176
diff --git a/scilab/modules/xcos/model/xcos.ecore b/scilab/modules/xcos/model/xcos.ecore
index 96571a6..a607e6c 100644
--- a/scilab/modules/xcos/model/xcos.ecore
+++ b/scilab/modules/xcos/model/xcos.ecore
@@ -148,6 +148,7 @@
148 <details key="documentation" value=" Simulation final time (starting at 0)"/> 148 <details key="documentation" value=" Simulation final time (starting at 0)"/>
149 </eAnnotations> 149 </eAnnotations>
150 </eStructuralFeatures> 150 </eStructuralFeatures>
151 <eStructuralFeatures xsi:type="ecore:EAttribute" name="absoluteTime" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"/>
151 <eStructuralFeatures xsi:type="ecore:EAttribute" name="absoluteTolerance" unique="false" 152 <eStructuralFeatures xsi:type="ecore:EAttribute" name="absoluteTolerance" unique="false"
152 eType="ecore:EDataType ../../../org.eclipse.emf.ecore/model/Ecore.ecore#//EDouble"/> 153 eType="ecore:EDataType ../../../org.eclipse.emf.ecore/model/Ecore.ecore#//EDouble"/>
153 <eStructuralFeatures xsi:type="ecore:EAttribute" name="relativeTolerance" unique="false" 154 <eStructuralFeatures xsi:type="ecore:EAttribute" name="relativeTolerance" unique="false"
@@ -216,10 +217,9 @@
216 <eClassifiers xsi:type="ecore:EClass" name="Port"> 217 <eClassifiers xsi:type="ecore:EClass" name="Port">
217 <eStructuralFeatures xsi:type="ecore:EAttribute" name="uid" unique="false" eType="ecore:EDataType ../../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString" 218 <eStructuralFeatures xsi:type="ecore:EAttribute" name="uid" unique="false" eType="ecore:EDataType ../../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"
218 iD="true"/> 219 iD="true"/>
219 <eStructuralFeatures xsi:type="ecore:EAttribute" name="datatype" unique="false"
220 upperBound="-1" eType="ecore:EDataType ../../../org.eclipse.emf.ecore/model/Ecore.ecore#//EInt"/>
221 <eStructuralFeatures xsi:type="ecore:EAttribute" name="firing" unique="false" 220 <eStructuralFeatures xsi:type="ecore:EAttribute" name="firing" unique="false"
222 eType="ecore:EDataType ../../../org.eclipse.emf.ecore/model/Ecore.ecore#//EDouble"/> 221 eType="ecore:EDataType ../../../org.eclipse.emf.ecore/model/Ecore.ecore#//EDouble"/>
222 <eStructuralFeatures xsi:type="ecore:EReference" name="datatype" eType="#//Datatype"/>
223 <eStructuralFeatures xsi:type="ecore:EReference" name="sourceBlock" eType="#//Block"/> 223 <eStructuralFeatures xsi:type="ecore:EReference" name="sourceBlock" eType="#//Block"/>
224 <eStructuralFeatures xsi:type="ecore:EAttribute" name="kind" unique="false" eType="#//PortKind"/> 224 <eStructuralFeatures xsi:type="ecore:EAttribute" name="kind" unique="false" eType="#//PortKind"/>
225 <eStructuralFeatures xsi:type="ecore:EAttribute" name="implicit" unique="false" 225 <eStructuralFeatures xsi:type="ecore:EAttribute" name="implicit" unique="false"
@@ -258,4 +258,16 @@
258 <details key="documentation" value="***************************************************************************************&#xA;An executable representation can be exported only if the diagram has been &quot;compiled&quot; *&#xA;**************************************************************************************"/> 258 <details key="documentation" value="***************************************************************************************&#xA;An executable representation can be exported only if the diagram has been &quot;compiled&quot; *&#xA;**************************************************************************************"/>
259 </eAnnotations> 259 </eAnnotations>
260 </eClassifiers> 260 </eClassifiers>
261 <eClassifiers xsi:type="ecore:EClass" name="Datatype">
262 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
263 <details key="documentation" value="Datatype of any propagated value"/>
264 </eAnnotations>
265 <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt">
266 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
267 <details key="documentation" value="type identifier : 1 for double, 2 for complex, 3 for int32, 4 for int16, 5 for int8, 6 for uint32, 7 for uint16, 8 for uint8"/>
268 </eAnnotations>
269 </eStructuralFeatures>
270 <eStructuralFeatures xsi:type="ecore:EAttribute" name="rows" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
271 <eStructuralFeatures xsi:type="ecore:EAttribute" name="columns" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
272 </eClassifiers>
261</ecore:EPackage> 273</ecore:EPackage>