]> source.dussan.org Git - poi.git/commitdiff
Latest stylesheet for hdf type generation
authorSaid Ryan Ackley <sackley@apache.org>
Fri, 3 May 2002 01:57:29 +0000 (01:57 +0000)
committerSaid Ryan Ackley <sackley@apache.org>
Fri, 3 May 2002 01:57:29 +0000 (01:57 +0000)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@352591 13f79535-47bb-0310-9956-ffa450edef68

src/types/styles/hdftype.xsl

index c71f5d67e039fa84e1582b8e2ba94d19375bc6ed..34e8f8bde63e31b81c4f292b8ee099ca5ea91553 100644 (file)
@@ -140,25 +140,28 @@ public abstract class <xsl:value-of select="@name"/>AbstractType
      * Sets the <xsl:value-of select="@name"/> field value.
      * <xsl:value-of select="@description"/>
      */
-    public void set<xsl:value-of select="recutil:getFieldName1stCap(@name,0)"/>(boolean value)
+    public void set<xsl:value-of select="recutil:getFieldName1stCap(@name,0)"/>(<xsl:value-of select="recutil:getBitFieldType(@name, @mask, ../@type)"/> value)
     {
-        <xsl:value-of select="recutil:getFieldName($fieldNum,../@name,0)"/> = <xsl:value-of select="recutil:getFieldName(@name,0)"/>.set<xsl:value-of select="recutil:getType1stCap(../@size,../@type,0)"/>Boolean(<xsl:value-of select="recutil:getFieldName($fieldNum,../@name,0)"/>, value);
+        <xsl:value-of select="recutil:getFieldName($fieldNum,../@name,0)"/> = <xsl:value-of select="recutil:getBitFieldSet(@name, @mask, ../@type, recutil:getFieldName($fieldNum,../@name,0))"/>;
+
+        <!--<xsl:value-of select="recutil:getFieldName(@name,0)"/>.setValue(<xsl:value-of select="recutil:getFieldName($fieldNum,../@name,0)"/>, value);-->
     }
 
     /**
      * <xsl:value-of select="@description"/>
      * @return  the <xsl:value-of select="@name"/> field value.
      */
-    public boolean is<xsl:value-of select="recutil:getFieldName1stCap(@name,0)"/>()
+    public <xsl:value-of select="recutil:getBitFieldFunction(@name,@mask,../@type, 'true')"/>()
     {
-        return <xsl:value-of select="recutil:getFieldName(@name,0)"/>.isSet(<xsl:value-of select="recutil:getFieldName($fieldNum,../@name,0)"/>);
+        return <xsl:value-of select="recutil:getBitFieldGet(@name, @mask,../@type, recutil:getFieldName($fieldNum,../@name,0))"/>
+        <!--return <xsl:value-of select="recutil:getFieldName(@name,0)"/>.isSet(<xsl:value-of select="recutil:getFieldName($fieldNum,../@name,0)"/>);-->
     }
 </xsl:for-each>
 </xsl:template>
 
-<xsl:template match = "bit" >    private BitField  <xsl:value-of select="@name"/> = new BitField(<xsl:value-of select="@mask"/>);
+<xsl:template match = "bit" >        private BitField  <xsl:value-of select="@name"/> = new BitField(<xsl:value-of select="@mask"/>);
 </xsl:template>
-<xsl:template match = "const">    public final static <xsl:value-of select="@type"/><xsl:text>  </xsl:text><xsl:value-of select="@name"/> = <xsl:value-of select="@value"/>;
+<xsl:template match = "const">        public final static <xsl:value-of select="@type"/><xsl:text>  </xsl:text><xsl:value-of select="@name"/> = <xsl:value-of select="@value"/>;
 </xsl:template>
 
 <xsl:template match = "const" mode="listconsts">
@@ -196,7 +199,7 @@ public abstract class <xsl:value-of select="@name"/>AbstractType
 <xsl:apply-templates select="bit" mode="bittostring"/>
 </xsl:template>
 
-<xsl:template match="bit" mode="bittostring">        buffer.append("         .<xsl:value-of select="recutil:getFieldName(@name,20)"/>     = ").append(is<xsl:value-of select="recutil:getFieldName1stCap(@name,20)"/>()).append('\n');
+<xsl:template match="bit" mode="bittostring">        buffer.append("         .<xsl:value-of select="recutil:getFieldName(@name,20)"/>     = ").append(<xsl:value-of select="recutil:getBitFieldFunction(@name, @mask, ../@type, 'false')"/>()).append('\n');
 </xsl:template>
 
 <xsl:template match="author">