|
From: Chris M. <zm...@us...> - 2001-07-09 22:38:32
|
Update of /cvsroot/kuml/kuml/libkuml/uml/tools
In directory usw-pr-cvs1:/tmp/cvs-serv28251/tools
Modified Files:
common_code.xsl gen_class_ccs.xsl
Log Message:
References need work but almost there.
Index: common_code.xsl
===================================================================
RCS file: /cvsroot/kuml/kuml/libkuml/uml/tools/common_code.xsl,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** common_code.xsl 2001/06/18 22:57:27 1.5
--- common_code.xsl 2001/07/09 22:38:30 1.6
***************
*** 49,54 ****
--- 49,58 ----
<xsl:choose>
+ <!-- If $letter is uppercase... -->
<xsl:when test='not(boolean(translate($letter, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "")))'>
+ <!-- Calculate the new string with the _ inserted and
+ the current letter in lowercase.
+ Unless we're at the 1st letter (don't want _text) -->
<xsl:variable name="new_string">
<xsl:value-of select='substring($text, 1, $position - 1)'/>
***************
*** 62,70 ****
</xsl:variable>
<xsl:call-template name="to_name">
<xsl:with-param name="text">
<xsl:value-of select="$new_string"/>
</xsl:with-param>
! <xsl:with-param name="position" select="$position + 2"/>
</xsl:call-template>
--- 66,88 ----
</xsl:variable>
+ <!-- Calculate the next position to be considered,
+ depending on whether we inserted an _ or not. -->
+ <xsl:variable name="new_position">
+ <xsl:choose>
+ <xsl:when test='$position=1'>
+ <xsl:value-of select="$position + 1"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$position + 2"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!-- Recurse! -->
<xsl:call-template name="to_name">
<xsl:with-param name="text">
<xsl:value-of select="$new_string"/>
</xsl:with-param>
! <xsl:with-param name="position" select="$new_position"/>
</xsl:call-template>
***************
*** 73,76 ****
--- 91,95 ----
<xsl:otherwise>
+ <!-- Recurse passing current letter through. -->
<xsl:call-template name="to_name">
<xsl:with-param name="text">
Index: gen_class_ccs.xsl
===================================================================
RCS file: /cvsroot/kuml/kuml/libkuml/uml/tools/gen_class_ccs.xsl,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** gen_class_ccs.xsl 2001/06/18 22:57:27 1.3
--- gen_class_ccs.xsl 2001/07/09 22:38:30 1.4
***************
*** 289,292 ****
--- 289,306 ----
-->
+ <xsl:text> void </xsl:text>
+ <xsl:value-of select="$class_name"/>
+ <xsl:text>_impl::set_</xsl:text>
+ <xsl:value-of select="$attr_name"/>
+ <xsl:text>( const </xsl:text>
+ <xsl:value-of select="$CORBA_type"/>
+ <xsl:text>Set& new_value ) </xsl:text>
[...710 lines suppressed...]
+ <xsl:text> ::Reflective::MofError) </xsl:text>
+
+ <xsl:text>{ Reflective::RefPackage_ptr rp = _this()->ref_immediate_package(); </xsl:text>
+ <xsl:text> Core::CorePackage_ptr cp = Core::CorePackage::_narrow(rp); </xsl:text>
+
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$package_name"/>
+ <xsl:text>::</xsl:text>
+ <xsl:value-of select="$assoc_name"/>
+ <xsl:text>_ptr assoc_proxy = cp-></xsl:text>
+ <xsl:value-of select="$lc_assoc_name"/>
+ <xsl:text>_ref(); </xsl:text>
+
+ <xsl:text> assoc_proxy->remove( old_element, _this() ); </xsl:text>
+
+ <xsl:text>} </xsl:text>
+
+ <xsl:text> </xsl:text>
</xsl:if>
|