diff options
-rw-r--r-- | data_structures_correct/TEXT_f.js | 25 | ||||
-rw-r--r-- | dependencies.js | 78 | ||||
-rw-r--r-- | finalmodsheet.xsl | 8 |
3 files changed, 107 insertions, 4 deletions
diff --git a/data_structures_correct/TEXT_f.js b/data_structures_correct/TEXT_f.js new file mode 100644 index 0000000..cb5a481 --- /dev/null +++ b/data_structures_correct/TEXT_f.js @@ -0,0 +1,25 @@ +function TEXT_f() { + + TEXT_f.prototype.define = function TEXT_f() { + this.font = 2; + this.siz = 1; + + var model = scicos_model(); + model.sim = new ScilabString(["text"]); + model.rpar = new ScilabString(["Text"]); + model.ipar = new ScilabDouble([this.font], [this.siz]); + + var exprs = ["Text", this.font, this.siz]; + + var graphics = scicos_graphics(); + graphics.orig = new ScilabDouble([0, 0]); + graphics.sz = new ScilabDouble([2, 1]); + graphics.exprs = new ScilabString(exprs); + this.x = mlist(["Text", "graphics", "model", "void", "gui"], new ScilabString(["Text", "graphics", "model", "void", "gui"]), graphics, model, new ScilabString([" "]), new ScilabString(["TEXT_f"])); + return new TextBlock(this.x); + } + + TEXT_f.prototype.details = function TEXT_f() { + return this.x; + } +} diff --git a/dependencies.js b/dependencies.js index e19c4ab..3907ea7 100644 --- a/dependencies.js +++ b/dependencies.js @@ -496,6 +496,84 @@ function GroundBlock() { } } +function TextBlock() { + if (arguments.length > 0) { + var options = arguments[0]; + this.angle = options.angle; // Not Known + this.blockType = getData(options["model"].blocktype)[0]; + this.connectable = options.connectable; // Not Known + this.id = options.id; + this.interfaceFunctionName = arguments.callee.caller.name; + this.ordering = options.ordering; + this.parent = options.parent; + if (options.model.sim instanceof Array) { + this.simulationFunctionName = getData(options["model"].sim[0])[0]; + var func_type; + switch (getData(options[model].sim[1])[0].toString()) { + case "-2.0": + func_type = "ESELECT"; + break; + case "-1.0": + func_type = "IFTHENELSE"; + break; + case "1.0": + func_type = "TYPE_1"; + break; + case "2.0": + func_type = "TYPE_2"; + break; + case "3.0": + func_type = "TYPE_3"; + break; + case "4.0": + func_type = "C_OR_FORTRAN"; + break; + case "5.0": + func_type = "SCILAB"; + break; + case "99.0": + func_type = "DEBUG"; + break; + case "1001.0": + func_type = "DYNAMIC_FORTRAN_1"; + break; + case "2001.0": + func_type = "DYNAMIC_C_1"; + break; + case "2004.0": + func_type = "DYNAMIC_EXPLICIT_4"; + break; + case "10001.0": + func_type = "OLDBLOCKS"; + break; + case "10004.0": + func_type = "IMPLICIT_C_OR_FORTRAN"; + break; + case "30004.0": + func_type = "MODELICA"; + break; + } + this.simulationFunctionType = func_type; + } else { + this.simulationFunctionName = getData(options["model"].sim)[0]; + this.simulationFunctionType = "DEFAULT"; + } + this.style = arguments.callee.caller.name; + this.value = options.value; // Not Known + this.vertex = options.vertex; // Not Known + this.visible = options.visible; // Not Known + this.exprs = options["graphics"].exprs; + this.realParameters = options["model"].rpar; + this.objectsParameters = options["model"].opar; + this.nbZerosCrossing = options["model"].nzcross; + this.nmode = options["model"].nmode; + this.oDState = list(); + this.equations = list(); // Not Known + this.blockName = "TextBlock"; + this.blockElementName = arguments.callee.caller.name; + } +} + function Product() { if (arguments.length > 0) { var options = arguments[0]; diff --git a/finalmodsheet.xsl b/finalmodsheet.xsl index 4b67400..25ffff6 100644 --- a/finalmodsheet.xsl +++ b/finalmodsheet.xsl @@ -172,7 +172,7 @@ Look for TAG:Break1!!! </xsl:template> <xsl:template name="Object" match="Object"> <xsl:element name="Array"> - <xsl:if test="name(..)='BasicBlock' or name(..)='AfficheBlock' or name(..)='BigSom' or name(..)='EventInBlock' or name(..)='EventOutBlock' or name(..)='RoundBlock' or name(..)='GroundBlock' or name(..)='EventInBlock' or name(..)='EventOutBlock' or name(..)='ImplicitInBlock' or name(..)='Product' or name(..)='ImplicitOutBlock' or name(..)='SuperBlock' or name(..)='ExplicitInBlock' or name(..)='ExplicitOutBlock' or name(..)='Summation'"> + <xsl:if test="name(..)='BasicBlock' or name(..)='AfficheBlock' or name(..)='BigSom' or name(..)='EventInBlock' or name(..)='EventOutBlock' or name(..)='RoundBlock' or name(..)='GroundBlock' or name(..)='EventInBlock' or name(..)='EventOutBlock' or name(..)='ImplicitInBlock' or name(..)='Product' or name(..)='ImplicitOutBlock' or name(..)='SuperBlock' or name(..)='ExplicitInBlock' or name(..)='ExplicitOutBlock' or name(..)='Summation' or name(..)='TextBlock'"> <xsl:if test="@as"> <xsl:attribute name="as"> <xsl:value-of select="@as" /> @@ -200,7 +200,7 @@ Look for TAG:Break1!!! --> <xsl:template name="Array" match="Array"> <xsl:element name="Array"> - <xsl:if test="name(..)='BasicBlock' or @as='context' or name(..)='AfficheBlock' or name(..)='BigSom' or name(..)='EventInBlock' or name(..)='EventOutBlock' or name(..)='RoundBlock' or name(..)='GroundBlock' or name(..)='EventInBlock' or name(..)='EventOutBlock' or name(..)='ImplicitInBlock' or name(..)='Product' or name(..)='ImplicitOutBlock' or name(..)='SuperBlock' or name(..)='ExplicitInBlock' or name(..)='ExplicitOutBlock' or name(..)='Summation'"> + <xsl:if test="name(..)='BasicBlock' or @as='context' or name(..)='AfficheBlock' or name(..)='BigSom' or name(..)='EventInBlock' or name(..)='EventOutBlock' or name(..)='RoundBlock' or name(..)='GroundBlock' or name(..)='EventInBlock' or name(..)='EventOutBlock' or name(..)='ImplicitInBlock' or name(..)='Product' or name(..)='ImplicitOutBlock' or name(..)='SuperBlock' or name(..)='ExplicitInBlock' or name(..)='ExplicitOutBlock' or name(..)='Summation' or name(..)='TextBlock'"> <xsl:if test="@as"> <xsl:attribute name="as"> <xsl:value-of select="@as" /> @@ -1581,7 +1581,7 @@ Look for TAG:Break1!!! </xsl:template> <xsl:template name="ScilabDouble" match="ScilabDouble"> <xsl:element name="ScilabDouble"> - <xsl:if test="name(..)='BasicBlock' or name(..)='AfficheBlock' or name(..)='BigSom' or name(..)='EventInBlock' or name(..)='EventOutBlock' or name(..)='RoundBlock' or name(..)='GroundBlock' or name(..)='EventInBlock' or name(..)='EventOutBlock' or name(..)='ImplicitInBlock' or name(..)='Product' or name(..)='ImplicitOutBlock' or name(..)='SuperBlock' or name(..)='ExplicitInBlock' or name(..)='ExplicitOutBlock' or name(..)='Summation'"> + <xsl:if test="name(..)='BasicBlock' or name(..)='AfficheBlock' or name(..)='BigSom' or name(..)='EventInBlock' or name(..)='EventOutBlock' or name(..)='RoundBlock' or name(..)='GroundBlock' or name(..)='EventInBlock' or name(..)='EventOutBlock' or name(..)='ImplicitInBlock' or name(..)='Product' or name(..)='ImplicitOutBlock' or name(..)='SuperBlock' or name(..)='ExplicitInBlock' or name(..)='ExplicitOutBlock' or name(..)='Summation' or name(..)='TextBlock'"> <xsl:if test="@as"> <xsl:attribute name="as"> <xsl:value-of select="@as" /> @@ -1613,7 +1613,7 @@ Look for TAG:Break1!!! </xsl:template> <xsl:template name="ScilabString" match="ScilabString"> <xsl:element name="ScilabString"> - <xsl:if test="name(..)='BasicBlock' or name(..)='AfficheBlock' or name(..)='BigSom' or name(..)='EventInBlock' or name(..)='EventOutBlock' or name(..)='RoundBlock' or name(..)='GroundBlock' or name(..)='EventInBlock' or name(..)='EventOutBlock' or name(..)='ImplicitInBlock' or name(..)='Product' or name(..)='ImplicitOutBlock' or name(..)='SuperBlock' or name(..)='ExplicitInBlock' or name(..)='ExplicitOutBlock' or name(..)='Summation'"> + <xsl:if test="name(..)='BasicBlock' or name(..)='AfficheBlock' or name(..)='BigSom' or name(..)='EventInBlock' or name(..)='EventOutBlock' or name(..)='RoundBlock' or name(..)='GroundBlock' or name(..)='EventInBlock' or name(..)='EventOutBlock' or name(..)='ImplicitInBlock' or name(..)='Product' or name(..)='ImplicitOutBlock' or name(..)='SuperBlock' or name(..)='ExplicitInBlock' or name(..)='ExplicitOutBlock' or name(..)='Summation' or name(..)='TextBlock'"> <xsl:if test="@as"> <xsl:attribute name="as"> <xsl:value-of select="@as" /> |