Commit 0b54220b authored by Pavel Vainerman's avatar Pavel Vainerman

(codegen): добавил поддержку 'long'

parent 67789bb6
......@@ -441,6 +441,7 @@ void <xsl:value-of select="$CLASSNAME"/>_SK::waitSM( int wait_msec, ObjectId _te
<xsl:template name="default-init-variables">
<xsl:if test="normalize-space(@const)!=''">
<xsl:if test="normalize-space(@type)='int'"><xsl:value-of select="normalize-space(@name)"/>(0),</xsl:if>
<xsl:if test="normalize-space(@type)='long'"><xsl:value-of select="normalize-space(@name)"/>(0),</xsl:if>
<xsl:if test="normalize-space(@type)='float'"><xsl:value-of select="normalize-space(@name)"/>(0),</xsl:if>
<xsl:if test="normalize-space(@type)='double'"><xsl:value-of select="normalize-space(@name)"/>(0),</xsl:if>
<xsl:if test="normalize-space(@type)='bool'"><xsl:value-of select="normalize-space(@name)"/>(false),</xsl:if>
......@@ -451,6 +452,9 @@ void <xsl:value-of select="$CLASSNAME"/>_SK::waitSM( int wait_msec, ObjectId _te
<xsl:if test="normalize-space(@type)='int'">
<xsl:value-of select="normalize-space(@name)"/>(uni_atoi( init3_str(conf->getArgParam("--<xsl:value-of select="../@arg_prefix"/><xsl:value-of select="@name"/>"),conf->getProp(cnode,"<xsl:value-of select="@name"/>"),"<xsl:value-of select="normalize-space(@default)"/>"))),
</xsl:if>
<xsl:if test="normalize-space(@type)='long'">
<xsl:value-of select="normalize-space(@name)"/>(uni_atoi( init3_str(conf->getArgParam("--<xsl:value-of select="../@arg_prefix"/><xsl:value-of select="@name"/>"),conf->getProp(cnode,"<xsl:value-of select="@name"/>"),"<xsl:value-of select="normalize-space(@default)"/>"))),
</xsl:if>
<xsl:if test="normalize-space(@type)='float'">
<xsl:value-of select="normalize-space(@name)"/>(atof( init3_str(conf->getArgParam("--<xsl:value-of select="../@arg_prefix"/><xsl:value-of select="@name"/>"),conf->getProp(cnode,"<xsl:value-of select="@name"/>"),"<xsl:value-of select="normalize-space(@default)"/>").c_str())),
</xsl:if>
......
......@@ -84,6 +84,8 @@ class <xsl:value-of select="$CLASSNAME"/>_SK:
<xsl:if test="normalize-space(@const)!=''">const </xsl:if>
<xsl:if test="normalize-space(@type)='int'">int <xsl:value-of select="@name"/>; /*!&lt; <xsl:value-of select="@comment"/> */
</xsl:if>
<xsl:if test="normalize-space(@type)='long'">long <xsl:value-of select="@name"/>; /*!&lt; <xsl:value-of select="@comment"/> */
</xsl:if>
<xsl:if test="normalize-space(@type)='float'">float <xsl:value-of select="@name"/>; /*!&lt; <xsl:value-of select="@comment"/> */
</xsl:if>
<xsl:if test="normalize-space(@type)='double'">double <xsl:value-of select="@name"/>; /*!&lt; <xsl:value-of select="@comment"/> */
......@@ -106,6 +108,8 @@ class <xsl:value-of select="$CLASSNAME"/>_SK:
<xsl:if test="normalize-space(@const)!=''">const </xsl:if>
<xsl:if test="normalize-space(@type)='int'">int <xsl:value-of select="@name"/>; /*!&lt; <xsl:value-of select="@comment"/> */
</xsl:if>
<xsl:if test="normalize-space(@type)='long'">long <xsl:value-of select="@name"/>; /*!&lt; <xsl:value-of select="@comment"/> */
</xsl:if>
<xsl:if test="normalize-space(@type)='float'">float <xsl:value-of select="@name"/>; /*!&lt; <xsl:value-of select="@comment"/> */
</xsl:if>
<xsl:if test="normalize-space(@type)='double'">double <xsl:value-of select="@name"/>; /*!&lt; <xsl:value-of select="@comment"/> */
......@@ -129,6 +133,8 @@ class <xsl:value-of select="$CLASSNAME"/>_SK:
<xsl:if test="normalize-space(@const)!=''">const </xsl:if>
<xsl:if test="normalize-space(@type)='int'">int <xsl:value-of select="@name"/>; /*!&lt; <xsl:value-of select="@comment"/> */
</xsl:if>
<xsl:if test="normalize-space(@type)='long'">long <xsl:value-of select="@name"/>; /*!&lt; <xsl:value-of select="@comment"/> */
</xsl:if>
<xsl:if test="normalize-space(@type)='float'">float <xsl:value-of select="@name"/>; /*!&lt; <xsl:value-of select="@comment"/> */
</xsl:if>
<xsl:if test="normalize-space(@type)='double'">double <xsl:value-of select="@name"/>; /*!&lt; <xsl:value-of select="@comment"/> */
......
......@@ -21,5 +21,6 @@ $(GENERATED2): ../@PACKAGE@-codegen testgen-alone.src.xml ../*.xsl
clean-local:
rm -rf $(GENERATED) $(GENERATED2)
#all-local: $(GENERATED)
#
all-local: $(GENERATED) $(GENERATED2)
......@@ -30,6 +30,7 @@
-->
<item name="test_int" type="int" min="0" comment="test int variable" const="1" public="1"/>
<item name="test_int2" type="int" max="100" default="110" no_range_exception="1"/>
<item name="test_long" type="long" max="100" default="110" no_range_exception="1"/>
<item name="test_float" type="float" max="100.0" default="50.0" />
<item name="test_double" type="double" max="100.340" default="52.044" />
<item name="test_bool" type="bool" private="1"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment