You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(8) |
Nov
(8) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(12) |
Jun
(14) |
Jul
(56) |
Aug
(6) |
Sep
(24) |
Oct
(1) |
Nov
(3) |
Dec
(5) |
2002 |
Jan
(2) |
Feb
(6) |
Mar
(22) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Gerard F. <ger...@us...> - 2001-09-16 19:41:36
|
Update of /cvsroot/kuml/kuml/docs/old_ftp/people/gerard/KumlPresentation In directory usw-pr-cvs1:/tmp/cvs-serv23534/KumlPresentation Log Message: Directory /cvsroot/kuml/kuml/docs/old_ftp/people/gerard/KumlPresentation added to the repository |
From: Gerard F. <ger...@us...> - 2001-09-16 19:39:48
|
Update of /cvsroot/kuml/kuml/docs/old_ftp/people/darius/wal In directory usw-pr-cvs1:/tmp/cvs-serv23226/wal Log Message: Directory /cvsroot/kuml/kuml/docs/old_ftp/people/darius/wal added to the repository |
From: Gerard F. <ger...@us...> - 2001-09-16 19:36:50
|
Update of /cvsroot/kuml/kuml/docs/old_ftp/design/dialogs/moved_dialogs In directory usw-pr-cvs1:/tmp/cvs-serv22865/moved_dialogs Log Message: Directory /cvsroot/kuml/kuml/docs/old_ftp/design/dialogs/moved_dialogs added to the repository |
From: Gerard F. <ger...@us...> - 2001-09-16 19:36:16
|
Update of /cvsroot/kuml/kuml/docs/old_ftp/design/dialogs In directory usw-pr-cvs1:/tmp/cvs-serv22768/dialogs Log Message: Directory /cvsroot/kuml/kuml/docs/old_ftp/design/dialogs added to the repository |
From: Gerard F. <ger...@us...> - 2001-09-16 19:27:59
|
Update of /cvsroot/kuml/kuml/docs/old_ftp/people/keith In directory usw-pr-cvs1:/tmp/cvs-serv20931/keith Log Message: Directory /cvsroot/kuml/kuml/docs/old_ftp/people/keith added to the repository |
From: Gerard F. <ger...@us...> - 2001-09-16 19:27:50
|
Update of /cvsroot/kuml/kuml/docs/old_ftp/people/gerard In directory usw-pr-cvs1:/tmp/cvs-serv20864/gerard Log Message: Directory /cvsroot/kuml/kuml/docs/old_ftp/people/gerard added to the repository |
From: Gerard F. <ger...@us...> - 2001-09-16 19:27:39
|
Update of /cvsroot/kuml/kuml/docs/old_ftp/people/foerster In directory usw-pr-cvs1:/tmp/cvs-serv20785/foerster Log Message: Directory /cvsroot/kuml/kuml/docs/old_ftp/people/foerster added to the repository |
From: Gerard F. <ger...@us...> - 2001-09-16 19:26:54
|
Update of /cvsroot/kuml/kuml/docs/old_ftp/people/darius In directory usw-pr-cvs1:/tmp/cvs-serv20586/darius Log Message: Directory /cvsroot/kuml/kuml/docs/old_ftp/people/darius added to the repository |
From: Gerard F. <ger...@us...> - 2001-09-16 19:26:34
|
Update of /cvsroot/kuml/kuml/docs/old_ftp/people/chris In directory usw-pr-cvs1:/tmp/cvs-serv20529/chris Log Message: Directory /cvsroot/kuml/kuml/docs/old_ftp/people/chris added to the repository |
From: Gerard F. <ger...@us...> - 2001-09-16 19:25:31
|
Update of /cvsroot/kuml/kuml/docs/old_ftp/people In directory usw-pr-cvs1:/tmp/cvs-serv20383/people Log Message: Directory /cvsroot/kuml/kuml/docs/old_ftp/people added to the repository |
From: Gerard F. <ger...@us...> - 2001-09-16 19:25:20
|
Update of /cvsroot/kuml/kuml/docs/old_ftp/design In directory usw-pr-cvs1:/tmp/cvs-serv20342/design Log Message: Directory /cvsroot/kuml/kuml/docs/old_ftp/design added to the repository |
From: Gerard F. <ger...@us...> - 2001-09-16 19:24:40
|
Update of /cvsroot/kuml/kuml/docs/old_ftp In directory usw-pr-cvs1:/tmp/cvs-serv20211/old_ftp Log Message: Directory /cvsroot/kuml/kuml/docs/old_ftp added to the repository |
From: Chris M. <zm...@us...> - 2001-09-10 22:09:36
|
Update of /cvsroot/kuml/kuml/libkuml/uml/tools In directory usw-pr-cvs1:/tmp/cvs-serv12655 Modified Files: common_proxy_code.xsl gen_assoc_hs.xsl gen_class_ccs.xsl gen_class_hs.xsl gen_proxy_ccs.xsl Log Message: Class bits work completely (for Core, others uncompiled) Proxys work for Core with minor mods (patches in the pipeline). Index: common_proxy_code.xsl =================================================================== RCS file: /cvsroot/kuml/kuml/libkuml/uml/tools/common_proxy_code.xsl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** common_proxy_code.xsl 2001/08/07 22:35:54 1.1 --- common_proxy_code.xsl 2001/09/10 22:09:32 1.2 *************** *** 12,16 **** <xsl:template ! match="Model:DataType | Model:DataType.typeCode | XMI.CorbaTypeCode" mode="create_param_type_name"> <xsl:param name="collection"/> --- 12,16 ---- <xsl:template ! match="Model:DataType | Model:DataType.typeCode | XMI.CorbaTypeCode | XMI.CorbaTcAlias" mode="create_param_type_name"> <xsl:param name="collection"/> *************** *** 31,35 **** ! <xsl:template match="XMI.CorbaTcAlias" mode="create_param_type_name"> <xsl:param name="collection"/> --- 31,35 ---- ! <xsl:template match="XMI.CorbaTcString" mode="create_param_type_name"> <xsl:param name="collection"/> *************** *** 43,68 **** </xsl:variable> ! <xsl:variable name="type_name" select="@xmi.tcName"/> <xsl:choose> <xsl:when test='not(string-length($collection) = 0)'> <xsl:text>const Core</xsl:text> </xsl:when> <xsl:otherwise> ! <xsl:value-of select="$package_name"/> </xsl:otherwise> </xsl:choose> - <xsl:text>::</xsl:text> - <xsl:value-of select="$type_name"/> - <xsl:value-of select="$collection"/> - - </xsl:template> - - <!-- If we got this far it must be xmi.id='a23' name='String' --> - <xsl:template match="XMI.CorbaTcString" mode="create_param_type_name"> - <xsl:param name="collection"/> - <xsl:text>const char*</xsl:text> </xsl:template> --- 43,62 ---- </xsl:variable> ! <xsl:variable name="type_name" select="ancestor::Model:DataType/@name"/> <xsl:choose> <xsl:when test='not(string-length($collection) = 0)'> <xsl:text>const Core</xsl:text> + <xsl:text>::</xsl:text> + <xsl:value-of select="$type_name"/> + <xsl:value-of select="$collection"/> </xsl:when> <xsl:otherwise> ! <!-- xsl:value-of select="$package_name"/ --> ! <xsl:text>const char*</xsl:text> </xsl:otherwise> </xsl:choose> </xsl:template> Index: gen_assoc_hs.xsl =================================================================== RCS file: /cvsroot/kuml/kuml/libkuml/uml/tools/gen_assoc_hs.xsl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** gen_assoc_hs.xsl 2001/05/16 22:21:39 1.2 --- gen_assoc_hs.xsl 2001/09/10 22:09:32 1.3 *************** *** 24,27 **** --- 24,114 ---- </xsl:variable> + <xsl:variable name="assoc_name"> + <xsl:call-template name="to_name"> + <xsl:with-param name="text"> + <xsl:value-of select="$assocName"/> + </xsl:with-param> + <xsl:with-param name="position" select="1"/> + </xsl:call-template> + </xsl:variable> + + <!-- Get association end 1 --> + <xsl:variable name="assocEnd1Name"> + <xsl:value-of select='./Model:Namespace.contents/Model:AssociationEnd[position()=1]/@name'/> + </xsl:variable> + + <xsl:variable name="assoc_end1_name"> + <xsl:call-template name="to_name"> + <xsl:with-param name="text"> + <xsl:value-of select="$assocEnd1Name"/> + </xsl:with-param> + <xsl:with-param name="position" select="1"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="assocEnd1Type"> + <xsl:value-of select='./Model:Namespace.contents/Model:AssociationEnd[position()=1]/@type'/> + </xsl:variable> + + <xsl:variable name="assocEnd1TypeName"> + <xsl:value-of select='/descendant::Model:Class[@xmi.id=$assocEnd1Type]/@name'/> + </xsl:variable> + + <xsl:variable name="assocEnd1_is_navigable"> + <xsl:value-of select='./Model:Namespace.contents/Model:AssociationEnd[position()=1]/@isNavigable'/> + </xsl:variable> + + <xsl:variable name="assocEnd1_is_changeable"> + <xsl:value-of select='./Model:Namespace.contents/Model:AssociationEnd[position()=1]/@isChangeable'/> + </xsl:variable> + + <xsl:variable name="assocEnd1_upper"> + <xsl:value-of select='./Model:Namespace.contents/Model:AssociationEnd[position()=1]/Model:AssociationEnd.multiplicity/XMI.field[position()=2]'/> + </xsl:variable> + + <xsl:variable name="assocEnd1_is_ordered"> + <xsl:value-of select='./Model:Namespace.contents/Model:AssociationEnd[position()=1]/Model:AssociationEnd.multiplicity/XMI.field[position()=3]'/> + </xsl:variable> + + <!-- Get association end 2 --> + <xsl:variable name="assocEnd2Name"> + <xsl:value-of select='./Model:Namespace.contents/Model:AssociationEnd[position()=2]/@name'/> + </xsl:variable> + + <xsl:variable name="assoc_end2_name"> + <xsl:call-template name="to_name"> + <xsl:with-param name="text"> + <xsl:value-of select="$assocEnd2Name"/> + </xsl:with-param> + <xsl:with-param name="position" select="1"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="assocEnd2Type"> + <xsl:value-of select='./Model:Namespace.contents/Model:AssociationEnd[position()=2]/@type'/> + </xsl:variable> + + <xsl:variable name="assocEnd2TypeName"> + <xsl:value-of select='/descendant::Model:Class[@xmi.id=$assocEnd2Type]/@name'/> + </xsl:variable> + + <xsl:variable name="assocEnd2_is_navigable"> + <xsl:value-of select='./Model:Namespace.contents/Model:AssociationEnd[position()=2]/@isNavigable'/> + </xsl:variable> + + <xsl:variable name="assocEnd2_is_changeable"> + <xsl:value-of select='./Model:Namespace.contents/Model:AssociationEnd[position()=2]/@isChangeable'/> + </xsl:variable> + + <xsl:variable name="assocEnd2_upper"> + <xsl:value-of select='./Model:Namespace.contents/Model:AssociationEnd[position()=2]/Model:AssociationEnd.multiplicity/XMI.field[position()=2]'/> + </xsl:variable> + + <xsl:variable name="assocEnd2_is_ordered"> + <xsl:value-of select='./Model:Namespace.contents/Model:AssociationEnd[position()=2]/Model:AssociationEnd.multiplicity/XMI.field[position()=3]'/> + </xsl:variable> + + <!-- DO THE OUTPUT --> + <xsl:text>#ifdef __</xsl:text> <xsl:value-of select="$ASSOC_NAME"/> *************** *** 42,49 **** <xsl:text> </xsl:text> <xsl:text>class </xsl:text> <xsl:value-of select="$assocName"/> ! <xsl:text> : Reflective::RefAssociation</xsl:text> </xsl:template> --- 129,437 ---- <xsl:text> </xsl:text> + <xsl:text> // assocEnd1Name </xsl:text> + <xsl:value-of select="$assocEnd1Name"/> + <xsl:text> </xsl:text> + + <xsl:text> // assocEnd1_is_navigable </xsl:text> + <xsl:value-of select="$assocEnd1_is_navigable"/> + <xsl:text> </xsl:text> + + <xsl:text> // assocEnd2Name </xsl:text> + <xsl:value-of select="$assocEnd2Name"/> + <xsl:text> </xsl:text> + + <xsl:text> // assocEnd2_is_navigable </xsl:text> + <xsl:value-of select="$assocEnd2_is_navigable"/> + <xsl:text> </xsl:text> + + <xsl:text> </xsl:text> + <xsl:text>class </xsl:text> + <xsl:value-of select="$assocName"/> + <xsl:text>_impl : </xsl:text> + + <xsl:text> virtual public RefAssociation_impl, </xsl:text> + + <xsl:text> virtual public POA_Core::</xsl:text> + <xsl:value-of select="$assocName"/> + <xsl:text>_impl </xsl:text> + <xsl:text>{ </xsl:text> + + <!-- // list of associated elements + <AssociationName>LinkSet all_ <association_name>_links () + raises (Reflective::MofError); + --> + + <xsl:text> </xsl:text> <xsl:value-of select="$assocName"/> ! <xsl:text>LinkSet all_</xsl:text> ! <xsl:value-of select="$assoc_name"/> ! <xsl:text>_links () </xsl:text> ! ! <xsl:text> throw( </xsl:text> ! <xsl:text> ::CORBA::SystemException, </xsl:text> ! <xsl:text> ::Reflective::MofError) </xsl:text> ! <xsl:text> ; </xsl:text> ! <xsl:text> </xsl:text> ! ! <!-- boolean exists ( in <AssociationEnd1Class> <association_end1_name>, ! in <AssociationEnd2Class> <association_end2_name>) ! raises (Reflective::MofError); ! --> ! ! <xsl:text> </xsl:text> ! <xsl:text>CORBA::Boolean exists( Core::</xsl:text> ! <xsl:value-of select="$assocEnd1TypeName"/> ! <xsl:text>_ptr </xsl:text> ! <xsl:value-of select="$assoc_end1_name"/> ! <xsl:text> , Core::</xsl:text> ! <xsl:value-of select="$assocEnd2TypeName"/> ! <xsl:text>_ptr </xsl:text> ! <xsl:value-of select="$assoc_end2_name"/> ! <xsl:text> ) </xsl:text> ! ! <xsl:text> throw( </xsl:text> ! <xsl:text> ::CORBA::SystemException, </xsl:text> ! <xsl:text> ::Reflective::MofError) </xsl:text> ! <xsl:text> ; </xsl:text> ! <xsl:text> </xsl:text> + <xsl:if test='$assocEnd1_is_navigable = "true"'> + + <!-- <AssociationEnd1Class>[<CollectionKind>] <association_end1_name> + ( in <AssociationEnd2Class> <association_end2_name>) + raises (Reflective::MofError); + --> + + <xsl:text> Core::</xsl:text> + <xsl:value-of select="$assocEnd1TypeName"/> + <xsl:text>Set* </xsl:text> + <xsl:value-of select="$assoc_end1_name"/> + <xsl:text>( Core::</xsl:text> + <xsl:value-of select="$assocEnd2TypeName"/> + <xsl:text>_ptr </xsl:text> + <xsl:value-of select="$assoc_end2_name"/> + <xsl:text> ) </xsl:text> + <xsl:text> throw( </xsl:text> + <xsl:text> ::CORBA::SystemException, </xsl:text> + <xsl:text> ::Reflective::MofError) </xsl:text> + <xsl:text> ; </xsl:text> + <xsl:text> </xsl:text> + + </xsl:if> + + <xsl:if test='$assocEnd2_is_navigable = "true"'> + + <!-- <AssociationEnd2Class>[<CollectionKind>] <association_end2_name> + ( in <AssociationEnd1Class> <association_end1_name>) + raises (Reflective::MofError); + --> + + <xsl:text> Core::</xsl:text> + <xsl:value-of select="$assocEnd2TypeName"/> + <xsl:text>Set* </xsl:text> + <xsl:value-of select="$assoc_end2_name"/> + <xsl:text>( Core::</xsl:text> + <xsl:value-of select="$assocEnd1TypeName"/> + <xsl:text>_ptr </xsl:text> + <xsl:value-of select="$assoc_end1_name"/> + <xsl:text> ) </xsl:text> + <xsl:text> throw( </xsl:text> + <xsl:text> ::CORBA::SystemException, </xsl:text> + <xsl:text> ::Reflective::MofError) </xsl:text> + <xsl:text> ; </xsl:text> + <xsl:text> </xsl:text> + + </xsl:if> + + + <xsl:if test='$assocEnd1_is_changeable = "true" and $assocEnd2_is_changeable = "true"'> + + <!-- void add ( in <AssociationEnd1Class> <association_end1_name>, + in <AssociationEnd2Class> <association_end2_name>) + raises (Reflective::MofError); + --> + + <xsl:text> void add ( Core::</xsl:text> + <xsl:value-of select="$assocEnd1TypeName"/> + <xsl:text>_ptr </xsl:text> + <xsl:value-of select="$assoc_end1_name"/> + <xsl:text>, Core::</xsl:text> + <xsl:value-of select="$assocEnd2TypeName"/> + <xsl:text>_ptr </xsl:text> + <xsl:value-of select="$assoc_end2_name"/> + <xsl:text> ) </xsl:text> + <xsl:text> throw( </xsl:text> + <xsl:text> ::CORBA::SystemException, </xsl:text> + <xsl:text> ::Reflective::MofError) </xsl:text> + <xsl:text> ; </xsl:text> + <xsl:text> </xsl:text> + + </xsl:if> + + <xsl:if test='$assocEnd1_is_changeable = "true" and + $assocEnd1_is_navigable = "true" and + $assocEnd2_is_changeable = "true" and + ($assocEnd1_upper > 1 or $assocEnd1_upper = -1) and + $assocEnd1_is_ordered = "true"'> + + <!-- void add_before_ <association_end1_name> + ( in <AssociationEnd1Class> <association_end1_name>, + in <AssociationEnd2Class> <association_end2_name>, + in <AssociationEnd1Class> before) + raises (Reflective::NotFound, Reflective::MofError); + --> + + <xsl:text> void add_before_</xsl:text> + <xsl:value-of select="$assoc_end1_name"/> + <xsl:text>( Core::</xsl:text> + <xsl:value-of select="$assocEnd1TypeName"/> + <xsl:text>_ptr </xsl:text> + <xsl:value-of select="$assoc_end1_name"/> + <xsl:text>, Core::</xsl:text> + <xsl:value-of select="$assocEnd2TypeName"/> + <xsl:text>_ptr </xsl:text> + <xsl:value-of select="$assoc_end2_name"/> + <xsl:text>, Core::</xsl:text> + <xsl:value-of select="$assocEnd1TypeName"/> + <xsl:text>_ptr before ) </xsl:text> + <xsl:text> throw( </xsl:text> + <xsl:text> ::CORBA::SystemException, </xsl:text> + <xsl:text> ::Reflective::NotFound, </xsl:text> + <xsl:text> ::Reflective::MofError) </xsl:text> + <xsl:text>; </xsl:text> + <xsl:text> </xsl:text> + + </xsl:if> + + <xsl:if test='$assocEnd1_is_changeable = "true" and + $assocEnd2_is_changeable = "true" and + $assocEnd2_is_navigable = "true" and + ($assocEnd2_upper > 1 or $assocEnd2_upper = -1) and + $assocEnd2_is_ordered = "true"'> + + <!-- void add_before_ <association_end2_name> + ( in <AssociationEnd1Class> <association_end1_name>, + in <AssociationEnd2Class> <association_end2_name>, + in <AssociationEnd2Class> before) + raises (Reflective::NotFound, Reflective::MofError); + --> + + <xsl:text> void add_before_</xsl:text> + <xsl:value-of select="$assoc_end2_name"/> + <xsl:text>( Core::</xsl:text> + <xsl:value-of select="$assocEnd1TypeName"/> + <xsl:text>_ptr </xsl:text> + <xsl:value-of select="$assoc_end1_name"/> + <xsl:text>, Core::</xsl:text> + <xsl:value-of select="$assocEnd2TypeName"/> + <xsl:text>_ptr </xsl:text> + <xsl:value-of select="$assoc_end2_name"/> + <xsl:text>, Core::</xsl:text> + <xsl:value-of select="$assocEnd2TypeName"/> + <xsl:text>_ptr before ) </xsl:text> + <xsl:text> throw( </xsl:text> + <xsl:text> ::CORBA::SystemException, </xsl:text> + <xsl:text> ::Reflective::NotFound, </xsl:text> + <xsl:text> ::Reflective::MofError) </xsl:text> + <xsl:text>; </xsl:text> + <xsl:text> </xsl:text> + + </xsl:if> + + <xsl:if test='$assocEnd1_is_navigable = "true" and + $assocEnd1_is_changeable = "true"'> + + <!-- void modify_ <association_end1_name> + ( in <AssociationEnd1Class> <association_end1_name>, + in <AssociationEnd2Class> <association_end2_name>, + in <AssociationEnd1Class> new_ <association_end1_name>) + raises (Reflective::NotFound, Reflective::MofError); + --> + + <xsl:text> void modify_</xsl:text> + <xsl:value-of select="$assoc_end1_name"/> + <xsl:text>( Core::</xsl:text> + <xsl:value-of select="$assocEnd1TypeName"/> + <xsl:text>_ptr </xsl:text> + <xsl:value-of select="$assoc_end1_name"/> + <xsl:text>, Core::</xsl:text> + <xsl:value-of select="$assocEnd2TypeName"/> + <xsl:text>_ptr</xsl:text> + <xsl:value-of select="$assoc_end2_name"/> + <xsl:text>, Core::</xsl:text> + <xsl:value-of select="$assocEnd1TypeName"/> + <xsl:text>_ptr new_</xsl:text> + <xsl:value-of select="$assoc_end1_name"/> + <xsl:text> ) </xsl:text> + <xsl:text> throw( </xsl:text> + <xsl:text> ::CORBA::SystemException, </xsl:text> + <xsl:text> ::Reflective::NotFound, </xsl:text> + <xsl:text> ::Reflective::MofError) </xsl:text> + <xsl:text> ; </xsl:text> + <xsl:text> </xsl:text> + + </xsl:if> + + <xsl:if test='$assocEnd2_is_navigable = "true" and + $assocEnd2_is_changeable = "true"'> + + <!-- void modify_ <association_end2_name> + ( in <AssociationEnd1Class> <association_end1_name>, + in <AssociationEnd2Class> <association_end2_name>, + in <AssociationEnd2Class> new_ <association_end2_name>) + raises (Reflective::NotFound, Reflective::MofError); + --> + + <xsl:text> void modify_</xsl:text> + <xsl:value-of select="$assoc_end2_name"/> + <xsl:text>( Core::</xsl:text> + <xsl:value-of select="$assocEnd2TypeName"/> + <xsl:text>_ptr </xsl:text> + <xsl:value-of select="$assoc_end2_name"/> + <xsl:text>, Core::</xsl:text> + <xsl:value-of select="$assocEnd1TypeName"/> + <xsl:text>_ptr</xsl:text> + <xsl:value-of select="$assoc_end1_name"/> + <xsl:text>, Core::</xsl:text> + <xsl:value-of select="$assocEnd2TypeName"/> + <xsl:text>_ptr new_</xsl:text> + <xsl:value-of select="$assoc_end2_name"/> + <xsl:text> ) </xsl:text> + <xsl:text> throw( </xsl:text> + <xsl:text> ::CORBA::SystemException, </xsl:text> + <xsl:text> ::Reflective::NotFound, </xsl:text> + <xsl:text> ::Reflective::MofError) </xsl:text> + <xsl:text> ; </xsl:text> + <xsl:text> </xsl:text> + + </xsl:if> + + <xsl:if test='$assocEnd1_is_changeable = "true" and + $assocEnd2_is_changeable = "true"'> + + <!-- void remove ( in <AssociationEnd1Class> <association_end1_name>, + in <AssociationEnd2Class> <association_end2_name>) + raises (Reflective::NotFound, Reflective::MofError); + --> + + <xsl:text>void remove( Core::</xsl:text> + <xsl:value-of select="$assocEnd1TypeName"/> + <xsl:text>_ptr </xsl:text> + <xsl:value-of select="$assoc_end1_name"/> + <xsl:text>, Core::</xsl:text> + <xsl:value-of select="$assocEnd2TypeName"/> + <xsl:text>_ptr </xsl:text> + <xsl:value-of select="$assoc_end2_name"/> + <xsl:text> ) </xsl:text> + <xsl:text> throw( </xsl:text> + <xsl:text> ::CORBA::SystemException, </xsl:text> + <xsl:text> ::Reflective::NotFound, </xsl:text> + <xsl:text> ::Reflective::MofError) </xsl:text> + <xsl:text>; </xsl:text> + <xsl:text> </xsl:text> + + </xsl:if> + </xsl:template> *************** *** 68,97 **** <xsl:template match="Model:Association"> - <xsl:variable name="package_name" select="ancestor::Model:Package/@name"/> - <xsl:variable name="assoc_name" select="@name"/> - <xsl:variable name="assocName"> - <xsl:call-template name="toName"> - <xsl:with-param name="text"> - <xsl:value-of select="@name"/> - </xsl:with-param> - <xsl:with-param name="position" select="1"/> - </xsl:call-template> - </xsl:variable> ! <xsl:variable name="filename"> ! <xsl:text>../</xsl:text> ! <xsl:value-of select="$package_name"/> ! <xsl:text>/</xsl:text> ! <xsl:value-of select="$assocName"/> ! <xsl:text>_impl.h</xsl:text> ! </xsl:variable> ! <xalan:write select="$filename"> ! <xsl:call-template name="ASSOCIATION"> ! <xsl:with-param name="assocName"> ! <xsl:value-of select="$assocName"/> ! </xsl:with-param> ! </xsl:call-template> ! </xalan:write> </xsl:template> --- 456,490 ---- <xsl:template match="Model:Association"> ! <xsl:if test='@visibility = "public_vis"'> ! <xsl:variable name="package_name" select="ancestor::Model:Package/@name"/> ! <xsl:variable name="assoc_name" select="@name"/> ! <xsl:variable name="assocName"> ! <xsl:call-template name="toName"> ! <xsl:with-param name="text"> ! <xsl:value-of select="@name"/> ! </xsl:with-param> ! <xsl:with-param name="position" select="1"/> ! </xsl:call-template> ! </xsl:variable> ! ! <xsl:variable name="filename"> ! <xsl:text>../</xsl:text> ! <xsl:value-of select="$package_name"/> ! <xsl:text>/</xsl:text> ! <xsl:value-of select="$assocName"/> ! <xsl:text>_impl.h</xsl:text> ! </xsl:variable> ! ! <xalan:write select="$filename"> ! <xsl:call-template name="ASSOCIATION"> ! <xsl:with-param name="assocName"> ! <xsl:value-of select="$assocName"/> ! </xsl:with-param> ! </xsl:call-template> ! </xalan:write> ! ! </xsl:if> </xsl:template> Index: gen_class_ccs.xsl =================================================================== RCS file: /cvsroot/kuml/kuml/libkuml/uml/tools/gen_class_ccs.xsl,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** gen_class_ccs.xsl 2001/07/26 21:18:43 1.6 --- gen_class_ccs.xsl 2001/09/10 22:09:32 1.7 *************** *** 319,323 **** </xsl:if> ! <xsl:if test='$lower = 0 and $upper = 1 and $is_changeable="true"'> <!-- void unset_ <attribute_name> () raises (Reflective::MofError); --- 319,325 ---- </xsl:if> ! <!-- Note: this doesn't match the MOF spec but does match the published idl. ! Unseting a multiple attribute seems valid. --> ! <xsl:if test='$lower = 0 and $is_changeable="true"'> <!-- void unset_ <attribute_name> () raises (Reflective::MofError); *************** *** 349,352 **** --- 351,357 ---- <xsl:value-of select="$attr_name"/> <xsl:text>( </xsl:text> + <xsl:if test='$is_const = true()'> + <xsl:text>const </xsl:text> + </xsl:if> <xsl:value-of select="$CORBA_type"/> <xsl:text> new_element ) </xsl:text> *************** *** 373,378 **** --- 378,389 ---- <xsl:value-of select="$attr_name"/> <xsl:text>_before( </xsl:text> + <xsl:if test='$is_const = true()'> + <xsl:text>const </xsl:text> + </xsl:if> <xsl:value-of select="$CORBA_type"/> <xsl:text> new_element, </xsl:text> + <xsl:if test='$is_const = true()'> + <xsl:text>const </xsl:text> + </xsl:if> <xsl:value-of select="$CORBA_type"/> <xsl:text> before_element ) </xsl:text> *************** *** 401,404 **** --- 412,418 ---- <xsl:value-of select="$attr_name"/> <xsl:text>_at( </xsl:text> + <xsl:if test='$is_const = true()'> + <xsl:text>const </xsl:text> + </xsl:if> <xsl:value-of select="$CORBA_type"/> <xsl:text> new_element, </xsl:text> *************** *** 427,432 **** --- 441,452 ---- <xsl:value-of select="$attr_name"/> <xsl:text>( </xsl:text> + <xsl:if test='$is_const = true()'> + <xsl:text>const </xsl:text> + </xsl:if> <xsl:value-of select="$CORBA_type"/> <xsl:text> old_element, </xsl:text> + <xsl:if test='$is_const = true()'> + <xsl:text>const </xsl:text> + </xsl:if> <xsl:value-of select="$CORBA_type"/> <xsl:text> new_element ) </xsl:text> *************** *** 454,457 **** --- 474,480 ---- <xsl:value-of select="$attr_name"/> <xsl:text>_at( </xsl:text> + <xsl:if test='$is_const = true()'> + <xsl:text>const </xsl:text> + </xsl:if> <xsl:value-of select="$CORBA_type"/> <xsl:text> new_element, </xsl:text> *************** *** 479,482 **** --- 502,508 ---- <xsl:value-of select="$attr_name"/> <xsl:text>( </xsl:text> + <xsl:if test='$is_const = true()'> + <xsl:text>const </xsl:text> + </xsl:if> <xsl:value-of select="$CORBA_type"/> <xsl:text> old_element ) </xsl:text> Index: gen_class_hs.xsl =================================================================== RCS file: /cvsroot/kuml/kuml/libkuml/uml/tools/gen_class_hs.xsl,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** gen_class_hs.xsl 2001/08/07 22:35:54 1.6 --- gen_class_hs.xsl 2001/09/10 22:09:32 1.7 *************** *** 499,503 **** </xsl:if> ! <xsl:if test='$lower = 0 and $upper = 1 and $is_changeable="true"'> <!-- void unset_ <attribute_name> () raises (Reflective::MofError); --- 499,505 ---- </xsl:if> ! <!-- Note: this doesn't match the MOF spec but does match the published idl. ! Unseting a multiple attribute seems valid. --> ! <xsl:if test='$lower = 0 and $is_changeable="true"'> <!-- void unset_ <attribute_name> () raises (Reflective::MofError); *************** *** 526,529 **** --- 528,534 ---- <xsl:value-of select="$attr_name"/> <xsl:text>( </xsl:text> + <xsl:if test='$is_const = true()'> + <xsl:text>const </xsl:text> + </xsl:if> <xsl:value-of select="$CORBA_type"/> <xsl:text> new_element ) </xsl:text> *************** *** 549,554 **** --- 554,565 ---- <xsl:value-of select="$attr_name"/> <xsl:text>_before( </xsl:text> + <xsl:if test='$is_const = true()'> + <xsl:text>const </xsl:text> + </xsl:if> <xsl:value-of select="$CORBA_type"/> <xsl:text> new_element, </xsl:text> + <xsl:if test='$is_const = true()'> + <xsl:text>const </xsl:text> + </xsl:if> <xsl:value-of select="$CORBA_type"/> <xsl:text> before_element ) </xsl:text> *************** *** 575,578 **** --- 586,592 ---- <xsl:value-of select="$attr_name"/> <xsl:text>_at( </xsl:text> + <xsl:if test='$is_const = true()'> + <xsl:text>const </xsl:text> + </xsl:if> <xsl:value-of select="$CORBA_type"/> <xsl:text> new_element, </xsl:text> *************** *** 600,605 **** --- 614,625 ---- <xsl:value-of select="$attr_name"/> <xsl:text>( </xsl:text> + <xsl:if test='$is_const = true()'> + <xsl:text>const </xsl:text> + </xsl:if> <xsl:value-of select="$CORBA_type"/> <xsl:text> old_element, </xsl:text> + <xsl:if test='$is_const = true()'> + <xsl:text>const </xsl:text> + </xsl:if> <xsl:value-of select="$CORBA_type"/> <xsl:text> new_element ) </xsl:text> *************** *** 626,629 **** --- 646,652 ---- <xsl:value-of select="$attr_name"/> <xsl:text>_at( </xsl:text> + <xsl:if test='$is_const = true()'> + <xsl:text>const </xsl:text> + </xsl:if> <xsl:value-of select="$CORBA_type"/> <xsl:text> new_element, </xsl:text> *************** *** 650,653 **** --- 673,679 ---- <xsl:value-of select="$attr_name"/> <xsl:text>( </xsl:text> + <xsl:if test='$is_const = true()'> + <xsl:text>const </xsl:text> + </xsl:if> <xsl:value-of select="$CORBA_type"/> <xsl:text> old_element ) </xsl:text> Index: gen_proxy_ccs.xsl =================================================================== RCS file: /cvsroot/kuml/kuml/libkuml/uml/tools/gen_proxy_ccs.xsl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** gen_proxy_ccs.xsl 2001/08/07 22:35:54 1.1 --- gen_proxy_ccs.xsl 2001/09/10 22:09:32 1.2 *************** *** 38,48 **** </xsl:variable> ! <xsl:text> impl->set_</xsl:text> ! <xsl:value-of select="$the_attr"/> ! <xsl:text>(</xsl:text> ! <xsl:value-of select="$the_attr"/> ! <xsl:text>); </xsl:text> </xsl:template> <xsl:template match="Model:Class" mode="set_attrs"> --- 38,117 ---- </xsl:variable> ! <xsl:variable name="lower" ! select="./Model:StructuralFeature.multiplicity/XMI.field[position()=1]"/> ! <xsl:variable name="upper" ! select="./Model:StructuralFeature.multiplicity/XMI.field[position()=2]"/> ! <xsl:variable name="is_ordered" ! select="./Model:StructuralFeature.multiplicity/XMI.field[position()=3]"/> ! <xsl:variable name="is_unique" ! select="./Model:StructuralFeature.multiplicity/XMI.field[position()=4]"/> ! ! <xsl:if test='$lower=0 and $upper=1'> ! ! <xsl:variable name="type_ref" select="@type"/> ! ! <xsl:variable name="collection"> ! <xsl:call-template name="collection_name"/> ! </xsl:variable> ! ! <xsl:variable name="the_C_type"> ! <xsl:apply-templates ! select='/descendant::*[attribute::xmi.id=$type_ref]' ! mode="create_param_type_name"> ! <xsl:with-param name="collection"> ! <xsl:value-of select="$collection"/> ! </xsl:with-param> ! </xsl:apply-templates> ! </xsl:variable> ! ! <xsl:choose> ! <xsl:when test='$the_C_type = "const char*"'> ! ! <xsl:text> impl->set_</xsl:text> ! <xsl:value-of select="$the_attr"/> ! <xsl:text>(</xsl:text> ! <xsl:value-of select="$the_attr"/> ! <xsl:text>); </xsl:text> ! ! </xsl:when> ! <xsl:otherwise> ! ! <xsl:text> if (</xsl:text> ! <xsl:value-of select="$the_attr"/> ! <xsl:text>.length() > 0) </xsl:text> ! ! <xsl:text> impl->set_</xsl:text> ! <xsl:value-of select="$the_attr"/> ! <xsl:text>(</xsl:text> ! <xsl:value-of select="$the_attr"/> ! <xsl:text>[0]); </xsl:text> ! ! </xsl:otherwise> ! </xsl:choose> ! ! </xsl:if> ! ! <xsl:if test='$lower=1 and $upper=1'> ! ! <xsl:text> impl->set_</xsl:text> ! <xsl:value-of select="$the_attr"/> ! <xsl:text>(</xsl:text> ! <xsl:value-of select="$the_attr"/> ! <xsl:text>); </xsl:text> ! ! </xsl:if> + <xsl:if test='$upper > 1 or $upper=-1'> + + <xsl:text> impl->set_</xsl:text> + <xsl:value-of select="$the_attr"/> + <xsl:text>(</xsl:text> + <xsl:value-of select="$the_attr"/> + <xsl:text>); </xsl:text> + + </xsl:if> + </xsl:template> + <xsl:template match="Model:Class" mode="set_attrs"> |
From: Chris M. <zm...@us...> - 2001-08-07 22:39:16
|
Update of /cvsroot/kuml/kuml/libkuml/uml In directory usw-pr-cvs1:/tmp/cvs-serv23797 Modified Files: codegen.mf Log Message: Manual commit of codegen makefile. Dunno why the previous commit didn't, er, commit it. Index: codegen.mf =================================================================== RCS file: /cvsroot/kuml/kuml/libkuml/uml/codegen.mf,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** codegen.mf 2001/05/22 22:59:14 1.1 --- codegen.mf 2001/08/07 22:39:13 1.2 *************** *** 1,4 **** CLASSPATH='/opt/xalan-j_2_0_1/bin/xalan.jar:/opt/xalan-j_2_0_1/bin/xerces.jar' ! JAVACOMM=java -Xmx100000000 -classpath $(CLASSPATH) XALANCOMM=$(JAVACOMM) org.apache.xalan.xslt.Process MOF_MODEL_OF_UML=idl-1.4/01-02-15.xml --- 1,4 ---- CLASSPATH='/opt/xalan-j_2_0_1/bin/xalan.jar:/opt/xalan-j_2_0_1/bin/xerces.jar' ! JAVACOMM=java -Xmx150000000 -classpath $(CLASSPATH) XALANCOMM=$(JAVACOMM) org.apache.xalan.xslt.Process MOF_MODEL_OF_UML=idl-1.4/01-02-15.xml *************** *** 18,21 **** --- 18,24 ---- proxy_hs: $(XALANCOMM) -IN $(MOF_MODEL_OF_UML) -XSL $(XSL_DIR)/gen_proxy_hs.xsl + + proxy_ccs: + $(XALANCOMM) -IN $(MOF_MODEL_OF_UML) -XSL $(XSL_DIR)/gen_proxy_ccs.xsl clean: |
From: Chris M. <zm...@us...> - 2001-08-07 22:35:58
|
Update of /cvsroot/kuml/kuml/libkuml/uml/tools In directory usw-pr-cvs1:/tmp/cvs-serv23263/tools Modified Files: gen_class_hs.xsl gen_proxy_hs.xsl Added Files: common_proxy_code.xsl gen_proxy_ccs.xsl Log Message: First shot at proxy_ccs code. --- NEW FILE --- <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xalan="org.apache.xalan.xslt.extensions.Redirect" xmlns:Model="omg.org/mof.Model/1.3" extension-element-prefixes="xalan" version="1.0" > <!-- Templates for finding CORBA IDL type implementations. --> <!-- These use the type_name mode and setup the CORBA_type variable. --> <xsl:template match="Model:DataType | Model:DataType.typeCode | XMI.CorbaTypeCode" mode="create_param_type_name"> <xsl:param name="collection"/> <xsl:apply-templates mode="create_param_type_name"> <xsl:with-param name="collection"> <xsl:value-of select="$collection"/> </xsl:with-param> </xsl:apply-templates> </xsl:template> <xsl:template match="XMI.CorbaTcBoolean" mode="create_param_type_name"> <xsl:param name="collection"/> <xsl:text>CORBA::Boolean</xsl:text> </xsl:template> <xsl:template match="XMI.CorbaTcAlias" mode="create_param_type_name"> <xsl:param name="collection"/> <xsl:variable name="package_name"> <xsl:call-template name="toName"> <xsl:with-param name="text"> <xsl:value-of select="ancestor::Model:Package/@name"/> </xsl:with-param> <xsl:with-param name="position" select="1"/> </xsl:call-template> </xsl:variable> <xsl:variable name="type_name" select="@xmi.tcName"/> <xsl:choose> <xsl:when test='not(string-length($collection) = 0)'> <xsl:text>const Core</xsl:text> </xsl:when> <xsl:otherwise> <xsl:value-of select="$package_name"/> </xsl:otherwise> </xsl:choose> <xsl:text>::</xsl:text> <xsl:value-of select="$type_name"/> <xsl:value-of select="$collection"/> </xsl:template> <!-- If we got this far it must be xmi.id='a23' name='String' --> <xsl:template match="XMI.CorbaTcString" mode="create_param_type_name"> <xsl:param name="collection"/> <xsl:text>const char*</xsl:text> </xsl:template> <xsl:template match="XMI.CorbaTcEnum" mode="create_param_type_name"> <xsl:param name="collection"/> <xsl:variable name="package_name"> <xsl:call-template name="toName"> <xsl:with-param name="text"> <xsl:value-of select="ancestor::Model:Package/@name"/> </xsl:with-param> <xsl:with-param name="position" select="1"/> </xsl:call-template> </xsl:variable> <xsl:choose> <xsl:when test='not(string-length($collection) = 0)'> <xsl:text>const Core</xsl:text> </xsl:when> <xsl:otherwise> <xsl:value-of select="$package_name"/> </xsl:otherwise> </xsl:choose> <xsl:text>::</xsl:text> <xsl:value-of select="@xmi.tcName"/> <xsl:value-of select="$collection"/> </xsl:template> <xsl:template match="Model:Class" mode="create_param_type_name"> <xsl:param name="collection"/> <xsl:variable name="package_name"> <xsl:call-template name="toName"> <xsl:with-param name="text"> <xsl:value-of select="ancestor::Model:Package/@name"/> </xsl:with-param> <xsl:with-param name="position" select="1"/> </xsl:call-template> </xsl:variable> <xsl:variable name="class_name"> <xsl:call-template name="get_name"> <xsl:with-param name="the_xmi_id"> <xsl:value-of select="@xmi.id"/> </xsl:with-param> <xsl:with-param name="the_name"> <xsl:value-of select="@name"/> </xsl:with-param> </xsl:call-template> </xsl:variable> <xsl:choose> <xsl:when test='not(string-length($collection) = 0)'> <xsl:text>const Core</xsl:text> </xsl:when> <xsl:otherwise> <xsl:value-of select="$package_name"/> </xsl:otherwise> </xsl:choose> <xsl:text>::</xsl:text> <xsl:value-of select="$class_name"/> <xsl:choose> <xsl:when test='not(string-length($collection) = 0)'> <xsl:value-of select="$collection"/> </xsl:when> <xsl:otherwise> <xsl:text>_ptr</xsl:text> </xsl:otherwise> </xsl:choose> </xsl:template> <!-- Templates to do parameters to the create_<class> methods parameters. These templates all use the create_params mode. --> <!-- Replace the default rule. --> <xsl:template match="*" mode="create_params"/> <!-- Certain nodes do nothing. --> <xsl:template mode="create_params" match="/ | XMI | XMI.content | Model:Package | Model:Namespace.contents | Model:DataType.typeCode | XMI.CorbaTypeCode"> <xsl:apply-templates mode="create_params"/> </xsl:template> <xsl:template match="Model:Attribute" mode="create_params"> <!-- Hack!! If class name != ModelElement or attribute name != name.. --> <xsl:if test='not(ancestor::Model:Class/@name = "ModelElement" and @name = "name")'> <xsl:text>, </xsl:text> </xsl:if> <xsl:variable name="collection"> <xsl:call-template name="collection_name"/> </xsl:variable> <xsl:variable name="type_ref" select="@type"/> <xsl:apply-templates select='/descendant::*[attribute::xmi.id=$type_ref]' mode="create_param_type_name"> <xsl:with-param name="collection"> <xsl:value-of select="$collection"/> </xsl:with-param> </xsl:apply-templates> <xsl:text> </xsl:text> <xsl:call-template name="to_name"> <xsl:with-param name="text"> <xsl:value-of select="@name"/> </xsl:with-param> <xsl:with-param name="position" select="1"/> </xsl:call-template> </xsl:template> <xsl:template match="Model:Class" mode="create_params"> <!-- attempt to find this class's supertype --> <xsl:variable name="supertypes" select="@supertypes"/> <!-- if a supertype exists recurse on supertype --> <xsl:if test='count(attribute::supertypes) > 0'> <xsl:choose> <xsl:when test='contains(@supertypes," ")'> <xsl:apply-templates mode="create_params" select='/descendant::Model:Class[@xmi.id=substring-before($supertypes," ")]'/> <!-- Hack!! xsl:apply-templates mode="create_params" select='/descendant::Model:Class[@xmi.id=substring-after($supertypes," ")]'/ --> </xsl:when> <xsl:otherwise> <xsl:apply-templates mode="create_params" select='/descendant::Model:Class[@xmi.id=$supertypes]'/> </xsl:otherwise> </xsl:choose> </xsl:if> <!-- output the current nodes attributes --> <xsl:apply-templates mode="create_params"/> </xsl:template> </xsl:transform> --- NEW FILE --- <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xalan="org.apache.xalan.xslt.extensions.Redirect" xmlns:Model="omg.org/mof.Model/1.3" extension-element-prefixes="xalan" version="1.0" > <xsl:include href="common_code.xsl"/> <xsl:include href="common_proxy_code.xsl"/> <!-- Templates to use the parameters to the create_<class> method. These templates all use the set_attrs mode. --> <!-- Replace the default rule. --> <xsl:template match="*" mode="set_attrs"/> <!-- Certain nodes do nothing. --> <xsl:template mode="set_attrs" match="/ | XMI | XMI.content | Model:Package | Model:Namespace.contents | Model:DataType.typeCode | XMI.CorbaTypeCode"> <xsl:apply-templates mode="set_attrs"/> </xsl:template> <xsl:template match="Model:Attribute" mode="set_attrs"> <xsl:variable name="the_attr"> <xsl:call-template name="to_name"> <xsl:with-param name="text"> <xsl:value-of select="@name"/> </xsl:with-param> <xsl:with-param name="position" select="1"/> </xsl:call-template> </xsl:variable> <xsl:text> impl->set_</xsl:text> <xsl:value-of select="$the_attr"/> <xsl:text>(</xsl:text> <xsl:value-of select="$the_attr"/> <xsl:text>); </xsl:text> </xsl:template> <xsl:template match="Model:Class" mode="set_attrs"> <!-- attempt to find this class's supertype --> <xsl:variable name="supertypes" select="@supertypes"/> <!-- if a supertype exists recurse on supertype --> <xsl:if test='count(attribute::supertypes) > 0'> <xsl:choose> <xsl:when test='contains(@supertypes," ")'> <xsl:apply-templates mode="set_attrs" select='/descendant::Model:Class[@xmi.id=substring-before($supertypes," ")]'/> <!-- Hack!! xsl:apply-templates mode="set_attrs" select='/descendant::Model:Class[@xmi.id=substring-after($supertypes," ")]'/ --> </xsl:when> <xsl:otherwise> <xsl:apply-templates mode="set_attrs" select='/descendant::Model:Class[@xmi.id=$supertypes]'/> </xsl:otherwise> </xsl:choose> </xsl:if> <!-- output the current nodes attributes --> <xsl:apply-templates mode="set_attrs"/> </xsl:template> <xsl:template name="CLASS_PROXY"> <xsl:variable name="package_name" select="ancestor::Model:Package/@name"/> <xsl:variable name="class_name"> <xsl:call-template name="get_name"> <xsl:with-param name="the_xmi_id"> <xsl:value-of select="@xmi.id"/> </xsl:with-param> <xsl:with-param name="the_name"> <xsl:value-of select="@name"/> </xsl:with-param> </xsl:call-template> </xsl:variable> <xsl:variable name="processed_cn"> <xsl:call-template name="to_name"> <xsl:with-param name="text"> <xsl:value-of select="$class_name"/> </xsl:with-param> <xsl:with-param name="position" select="1"/> </xsl:call-template> </xsl:variable> <!-- Includes. --> <xsl:text>#include "</xsl:text> <xsl:value-of select="$class_name"/> <xsl:text>Class_impl.h" </xsl:text> <xsl:if test='@isAbstract = "false"'> <xsl:text>#include "</xsl:text> <xsl:value-of select="$class_name"/> <xsl:text>_impl.h" </xsl:text> </xsl:if> <xsl:text>#include "copy_to_iseq.h" </xsl:text> <xsl:text>#include "list_ops.h" </xsl:text> <xsl:text> </xsl:text> <xsl:text>// Implementation for interface </xsl:text> <xsl:value-of select="$class_name"/> <xsl:text>Class </xsl:text> <xsl:text> </xsl:text> <xsl:text>list<</xsl:text> <xsl:value-of select="$package_name"/> <xsl:text>::</xsl:text> <xsl:value-of select="$class_name"/> <xsl:text>_ptr> </xsl:text> <xsl:value-of select="$class_name"/> <xsl:text>Class_impl::fc_all_of_type_</xsl:text> <xsl:value-of select="$processed_cn"/> <xsl:text>; </xsl:text> <xsl:text> </xsl:text> <xsl:if test='@isAbstract = "false"'> <xsl:text>list<</xsl:text> <xsl:value-of select="$package_name"/> <xsl:text>::</xsl:text> <xsl:value-of select="$class_name"/> <xsl:text>_ptr> </xsl:text> <xsl:value-of select="$class_name"/> <xsl:text>Class_impl::fc_all_of_class_</xsl:text> <xsl:value-of select="$processed_cn"/> <xsl:text>; </xsl:text> <xsl:text> </xsl:text> </xsl:if> <!-- Constructor. --> <xsl:value-of select="$class_name"/> <xsl:text>Class_impl::</xsl:text> <xsl:value-of select="$class_name"/> <xsl:text>Class_impl() </xsl:text> <xsl:text>{ } </xsl:text> <!-- Destructor. --> <xsl:value-of select="$class_name"/> <xsl:text>Class_impl::~</xsl:text> <xsl:value-of select="$class_name"/> <xsl:text>Class_impl() </xsl:text> <xsl:text>{ } </xsl:text> <xsl:text> </xsl:text> <!-- all_of_type --> <xsl:value-of select="$package_name"/> <xsl:text>::</xsl:text> <xsl:value-of select="$class_name"/> <xsl:text>Set* </xsl:text> <xsl:value-of select="$class_name"/> <xsl:text>Class_impl::</xsl:text> <xsl:text>all_of_type_</xsl:text> <xsl:value-of select="$processed_cn"/> <xsl:text>() </xsl:text> <xsl:text>{ </xsl:text> <xsl:value-of select="$package_name"/> <xsl:text>::</xsl:text> <xsl:value-of select="$class_name"/> <xsl:text>Set_var seq = new </xsl:text> <xsl:value-of select="$package_name"/> <xsl:text>::</xsl:text> <xsl:value-of select="$class_name"/> <xsl:text>Set; </xsl:text> <xsl:text> copy_to_seq(seq, fc_all_of_type_</xsl:text> <xsl:value-of select="$processed_cn"/> <xsl:text>); </xsl:text> <xsl:text> return seq._retn(); </xsl:text> <xsl:text>} </xsl:text> <xsl:text> </xsl:text> <xsl:if test='@isAbstract = "false"'> <!-- all_of_class --> <xsl:value-of select="$package_name"/> <xsl:text>::</xsl:text> <xsl:value-of select="$class_name"/> <xsl:text>Set* </xsl:text> <xsl:value-of select="$class_name"/> <xsl:text>Class_impl::</xsl:text> <xsl:text>all_of_class_</xsl:text> <xsl:value-of select="$processed_cn"/> <xsl:text>() </xsl:text> <xsl:text>{ </xsl:text> <xsl:value-of select="$package_name"/> <xsl:text>::</xsl:text> <xsl:value-of select="$class_name"/> <xsl:text>Set_var seq = new </xsl:text> <xsl:value-of select="$package_name"/> <xsl:text>::</xsl:text> <xsl:value-of select="$class_name"/> <xsl:text>Set; </xsl:text> <xsl:text> copy_to_seq(seq, fc_all_of_class_</xsl:text> <xsl:value-of select="$processed_cn"/> <xsl:text>); </xsl:text> <xsl:text> return seq._retn(); </xsl:text> <xsl:text>} </xsl:text> </xsl:if> <xsl:text> </xsl:text> <!-- create_<class> method. --> <xsl:if test='@isAbstract = "false"'> <xsl:value-of select="$package_name"/> <xsl:text>::</xsl:text> <xsl:value-of select="$class_name"/> <xsl:text>_ptr </xsl:text> <xsl:value-of select="$class_name"/> <xsl:text>Class_impl::</xsl:text> <xsl:text>create_</xsl:text> <xsl:value-of select="$processed_cn"/> <xsl:text>( </xsl:text> <xsl:apply-templates mode="create_params" select="."/> <xsl:text> ) </xsl:text> <xsl:text> throw( </xsl:text> <xsl:text> ::CORBA::SystemException, </xsl:text> <xsl:text> ::Reflective::MofError) </xsl:text> <xsl:text>{ </xsl:text> <xsl:value-of select="$class_name"/> <xsl:text>_impl* impl = new </xsl:text> <xsl:value-of select="$class_name"/> <xsl:text>_impl; </xsl:text> <xsl:text> </xsl:text> <xsl:value-of select="$package_name"/> <xsl:text>::</xsl:text> <xsl:value-of select="$class_name"/> <xsl:text>_ptr retval = impl->_this(); </xsl:text> <xsl:apply-templates mode="set_attrs" select="."/> <xsl:text> fc_all_of_class_</xsl:text> <xsl:value-of select="$processed_cn"/> <xsl:text>.push_back(</xsl:text> <xsl:value-of select="$package_name"/> <xsl:text>::</xsl:text> <xsl:value-of select="$class_name"/> <xsl:text>::_duplicate(retval)); </xsl:text> <xsl:text> return retval; </xsl:text> <xsl:text>} </xsl:text> <xsl:text> </xsl:text> </xsl:if> </xsl:template> <!-- Main program starts here! --> <!-- Allow complete control over format. --> <xsl:strip-space elements="*"/> <!-- Output in text format. --> <xsl:output method="text"/> <!-- Replace the default rule. --> <xsl:template match="*"/> <!-- Certain nodes do nothing. --> <xsl:template match="/ | XMI | XMI.content | Model:Package | Model:Namespace.contents | Model:DataType.typeCode | XMI.CorbaTypeCode"> <xsl:apply-templates/> </xsl:template> <xsl:template match="Model:Class"> <xsl:variable name="package_name" select="ancestor::Model:Package/@name"/> <xsl:variable name="class_name"> <xsl:call-template name="get_name"> <xsl:with-param name="the_xmi_id"> <xsl:value-of select="@xmi.id"/> </xsl:with-param> <xsl:with-param name="the_name"> <xsl:value-of select="@name"/> </xsl:with-param> </xsl:call-template> </xsl:variable> <xsl:variable name="proxy_filename"> <xsl:text>../</xsl:text> <xsl:value-of select="$package_name"/> <xsl:text>/</xsl:text> <xsl:value-of select="$class_name"/> <xsl:text>Class_impl.cc</xsl:text> </xsl:variable> <xalan:write select="$proxy_filename"> <xsl:call-template name="CLASS_PROXY"/> </xalan:write> </xsl:template> </xsl:transform> Index: gen_class_hs.xsl =================================================================== RCS file: /cvsroot/kuml/kuml/libkuml/uml/tools/gen_class_hs.xsl,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** gen_class_hs.xsl 2001/07/26 21:18:43 1.5 --- gen_class_hs.xsl 2001/08/07 22:35:54 1.6 *************** *** 26,40 **** <xsl:template mode="include" match="/ | XMI | XMI.content | Model:Package | Model:Namespace.contents | Model:DataType.typeCode | XMI.CorbaTypeCode"> <xsl:apply-templates mode="include"/> </xsl:template> <xsl:template match="Model:Class" mode="include"> ! <xsl:variable name="classname" select="@name"/> ! <xsl:text>#include "</xsl:text> ! <xsl:value-of select="@name"/> ! <xsl:text>_impl.h" </xsl:text> ! <xsl:text> </xsl:text> </xsl:template> --- 26,43 ---- <xsl:template mode="include" match="/ | XMI | XMI.content | Model:Package | Model:Namespace.contents | Model:DataType.typeCode | XMI.CorbaTypeCode"> + <xsl:apply-templates mode="include"/> + </xsl:template> <xsl:template match="Model:Class" mode="include"> ! ! <xsl:variable name="classname" select="@name"/> ! <xsl:text>#include "</xsl:text> ! <xsl:value-of select="@name"/> ! <xsl:text>_impl.h" </xsl:text> ! <xsl:text> </xsl:text> </xsl:template> *************** *** 42,70 **** <xsl:template name="include-supertypes"> ! <xsl:choose> ! <xsl:when test="count(attribute::supertypes) = 0"> ! <xsl:text>#include "Reflective_impl.h" </xsl:text> ! </xsl:when> ! <xsl:otherwise> ! <xsl:variable name="supertypes" select="@supertypes"/> ! <xsl:choose> ! <xsl:when test='contains(@supertypes," ")'> ! <xsl:apply-templates mode="include" select='/descendant::Model:Class[@xmi.id=substring-before($supertypes," ")]'/> ! <xsl:apply-templates mode="include" select='/descendant::Model:Class[@xmi.id=substring-after($supertypes," ")]'/> ! </xsl:when> ! <xsl:otherwise> ! <xsl:apply-templates mode="include" ! select='/descendant::Model:Class[@xmi.id=$supertypes]'/> ! </xsl:otherwise> ! </xsl:choose> ! </xsl:otherwise> ! </xsl:choose> </xsl:template> --- 45,68 ---- <xsl:template name="include-supertypes"> ! <xsl:if test="count(attribute::supertypes) > 0"> ! <xsl:variable name="supertypes" select="@supertypes"/> ! <xsl:choose> ! <xsl:when test='contains(@supertypes," ")'> ! <xsl:apply-templates mode="include" select='/descendant::Model:Class[@xmi.id=substring-before($supertypes," ")]'/> ! <xsl:apply-templates mode="include" select='/descendant::Model:Class[@xmi.id=substring-after($supertypes," ")]'/> ! </xsl:when> ! <xsl:otherwise> ! <xsl:apply-templates mode="include" ! select='/descendant::Model:Class[@xmi.id=$supertypes]'/> ! </xsl:otherwise> ! </xsl:choose> ! </xsl:if> </xsl:template> *************** *** 82,122 **** <xsl:template mode="inherit" match="/ | XMI | XMI.content | Model:Package | Model:Namespace.contents | Model:DataType.typeCode | XMI.CorbaTypeCode"> <xsl:apply-templates mode="inherit"/> </xsl:template> <xsl:template match="Model:Class" mode="inherit"> ! <xsl:text> virtual public </xsl:text> ! <xsl:value-of select="@name"/> ! <xsl:text>_impl, </xsl:text> </xsl:template> <xsl:template name="inherits"> ! <xsl:choose> ! <xsl:when test="count(attribute::supertypes) = 0"> ! <xsl:text> virtual public Reflective::RefObject, </xsl:text> ! </xsl:when> ! <xsl:otherwise> ! <xsl:variable name="supertypes" select="@supertypes"/> ! <xsl:choose> ! <xsl:when test='contains(@supertypes," ")'> ! <xsl:apply-templates mode="inherit" select='/descendant::Model:Class[@xmi.id=substring-before($supertypes," ")]'/> ! <xsl:apply-templates mode="inherit" select='/descendant::Model:Class[@xmi.id=substring-after($supertypes," ")]'/> ! </xsl:when> ! <xsl:otherwise> ! <xsl:apply-templates mode="inherit" ! select='/descendant::Model:Class[@xmi.id=$supertypes]'/> ! </xsl:otherwise> ! </xsl:choose> ! </xsl:otherwise> ! </xsl:choose> </xsl:template> --- 80,119 ---- <xsl:template mode="inherit" match="/ | XMI | XMI.content | Model:Package | Model:Namespace.contents | Model:DataType.typeCode | XMI.CorbaTypeCode"> + <xsl:apply-templates mode="inherit"/> + </xsl:template> <xsl:template match="Model:Class" mode="inherit"> ! ! <xsl:text> virtual public </xsl:text> ! <xsl:value-of select="@name"/> ! <xsl:text>_impl, </xsl:text> ! </xsl:template> <xsl:template name="inherits"> ! <xsl:if test="count(attribute::supertypes) > 0"> ! <xsl:variable name="supertypes" select="@supertypes"/> ! <xsl:choose> ! <xsl:when test='contains(@supertypes," ")'> ! <xsl:apply-templates mode="inherit" select='/descendant::Model:Class[@xmi.id=substring-before($supertypes," ")]'/> ! <xsl:apply-templates mode="inherit" select='/descendant::Model:Class[@xmi.id=substring-after($supertypes," ")]'/> ! </xsl:when> ! <xsl:otherwise> ! <xsl:apply-templates mode="inherit" ! select='/descendant::Model:Class[@xmi.id=$supertypes]'/> ! </xsl:otherwise> ! </xsl:choose> ! </xsl:if> </xsl:template> Index: gen_proxy_hs.xsl =================================================================== RCS file: /cvsroot/kuml/kuml/libkuml/uml/tools/gen_proxy_hs.xsl,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** gen_proxy_hs.xsl 2001/07/26 21:18:43 1.9 --- gen_proxy_hs.xsl 2001/08/07 22:35:54 1.10 *************** *** 9,12 **** --- 9,13 ---- <xsl:include href="common_code.xsl"/> + <xsl:include href="common_proxy_code.xsl"/> *************** *** 96,100 **** <xsl:choose> <xsl:when test="count(attribute::supertypes) = 0"> ! <xsl:text> virtual public Reflective::RefObject, </xsl:text> </xsl:when> <xsl:otherwise> --- 97,101 ---- <xsl:choose> <xsl:when test="count(attribute::supertypes) = 0"> ! <xsl:text> virtual public RefObject_impl, </xsl:text> </xsl:when> <xsl:otherwise> *************** *** 119,337 **** </xsl:otherwise> </xsl:choose> - </xsl:template> - - - <!-- Templates for finding CORBA IDL type implementations. --> - <!-- These use the type_name mode and setup the CORBA_type variable. --> - - - <xsl:template - match="Model:DataType | Model:DataType.typeCode | XMI.CorbaTypeCode" - mode="create_param_type_name"> - <xsl:param name="collection"/> - - <xsl:apply-templates mode="create_param_type_name"> - <xsl:with-param name="collection"> - <xsl:value-of select="$collection"/> - </xsl:with-param> - </xsl:apply-templates> - - </xsl:template> - - - <xsl:template match="XMI.CorbaTcBoolean" mode="create_param_type_name"> - <xsl:param name="collection"/> - <xsl:text>CORBA::Boolean</xsl:text> - </xsl:template> - - - <xsl:template match="XMI.CorbaTcAlias" mode="create_param_type_name"> - <xsl:param name="collection"/> - - <xsl:variable name="package_name"> - <xsl:call-template name="toName"> - <xsl:with-param name="text"> - <xsl:value-of select="ancestor::Model:Package/@name"/> - </xsl:with-param> - <xsl:with-param name="position" select="1"/> - </xsl:call-template> - </xsl:variable> - - <xsl:variable name="type_name" select="@xmi.tcName"/> - - <xsl:choose> - <xsl:when test='not(string-length($collection) = 0)'> - <xsl:text>const Core</xsl:text> - </xsl:when> - <xsl:otherwise> - <xsl:value-of select="$package_name"/> - </xsl:otherwise> - </xsl:choose> - - <xsl:text>::</xsl:text> - <xsl:value-of select="$type_name"/> - <xsl:value-of select="$collection"/> - - </xsl:template> - - - <!-- If we got this far it must be xmi.id='a23' name='String' --> - <xsl:template match="XMI.CorbaTcString" mode="create_param_type_name"> - <xsl:param name="collection"/> - <xsl:text>const char*</xsl:text> - </xsl:template> - - - <xsl:template match="XMI.CorbaTcEnum" mode="create_param_type_name"> - <xsl:param name="collection"/> - - <xsl:variable name="package_name"> - <xsl:call-template name="toName"> - <xsl:with-param name="text"> - <xsl:value-of select="ancestor::Model:Package/@name"/> - </xsl:with-param> - <xsl:with-param name="position" select="1"/> - </xsl:call-template> - </xsl:variable> - - <xsl:choose> - <xsl:when test='not(string-length($collection) = 0)'> - <xsl:text>const Core</xsl:text> - </xsl:when> - <xsl:otherwise> - <xsl:value-of select="$package_name"/> - </xsl:otherwise> - </xsl:choose> - - <xsl:text>::</xsl:text> - <xsl:value-of select="@xmi.tcName"/> - <xsl:value-of select="$collection"/> - - </xsl:template> - - - <xsl:template match="Model:Class" mode="create_param_type_name"> - <xsl:param name="collection"/> - - <xsl:variable name="package_name"> - <xsl:call-template name="toName"> - <xsl:with-param name="text"> - <xsl:value-of select="ancestor::Model:Package/@name"/> - </xsl:with-param> - <xsl:with-param name="position" select="1"/> - </xsl:call-template> - </xsl:variable> - - <xsl:variable name="class_name"> - <xsl:call-template name="get_name"> - <xsl:with-param name="the_xmi_id"> - <xsl:value-of select="@xmi.id"/> - </xsl:with-param> - <xsl:with-param name="the_name"> - <xsl:value-of select="@name"/> - </xsl:with-param> - </xsl:call-template> - </xsl:variable> - - <xsl:choose> - <xsl:when test='not(string-length($collection) = 0)'> - <xsl:text>const Core</xsl:text> - </xsl:when> - <xsl:otherwise> - <xsl:value-of select="$package_name"/> - </xsl:otherwise> - </xsl:choose> - - <xsl:text>::</xsl:text> - - <xsl:value-of select="$class_name"/> - - <xsl:choose> - <xsl:when test='not(string-length($collection) = 0)'> - <xsl:value-of select="$collection"/> - </xsl:when> - <xsl:otherwise> - <xsl:text>_ptr</xsl:text> - </xsl:otherwise> - </xsl:choose> - - </xsl:template> - - - <!-- Templates to do parameters to the create_<class> methods parameters. - These templates all use the create_params mode. - --> - - - <!-- Replace the default rule. --> - <xsl:template match="*" mode="create_params"/> - - - <!-- Certain nodes do nothing. --> - <xsl:template mode="create_params" - match="/ | XMI | XMI.content | Model:Package | Model:Namespace.contents | Model:DataType.typeCode | XMI.CorbaTypeCode"> - <xsl:apply-templates mode="create_params"/> - </xsl:template> - - - <xsl:template match="Model:Attribute" mode="create_params"> - - <!-- Hack!! If class name != ModelElement or attribute name != name.. --> - <xsl:if - test='not(ancestor::Model:Class/@name = "ModelElement" and @name = "name")'> - <xsl:text>, </xsl:text> - </xsl:if> - - <xsl:variable name="collection"> - <xsl:call-template name="collection_name"/> - </xsl:variable> - - <xsl:variable name="type_ref" select="@type"/> - <xsl:apply-templates - select='/descendant::*[attribute::xmi.id=$type_ref]' - mode="create_param_type_name"> - <xsl:with-param name="collection"> - <xsl:value-of select="$collection"/> - </xsl:with-param> - </xsl:apply-templates> - - <xsl:text> </xsl:text> - - <xsl:call-template name="to_name"> - <xsl:with-param name="text"> - <xsl:value-of select="@name"/> - </xsl:with-param> - <xsl:with-param name="position" select="1"/> - </xsl:call-template> - - </xsl:template> - - - <xsl:template match="Model:Class" mode="create_params"> - - <!-- attempt to find this class's supertype --> - <xsl:variable name="supertypes" select="@supertypes"/> - - <!-- if a supertype exists recurse on supertype --> - <xsl:if test='count(attribute::supertypes) > 0'> - - <xsl:choose> - <xsl:when test='contains(@supertypes," ")'> - <xsl:apply-templates mode="create_params" - select='/descendant::Model:Class[@xmi.id=substring-before($supertypes," ")]'/> - <!-- Hack!! xsl:apply-templates mode="create_params" - select='/descendant::Model:Class[@xmi.id=substring-after($supertypes," ")]'/ --> - </xsl:when> - <xsl:otherwise> - <xsl:apply-templates mode="create_params" - select='/descendant::Model:Class[@xmi.id=$supertypes]'/> - </xsl:otherwise> - </xsl:choose> - - </xsl:if> - - <!-- output the current nodes attributes --> - <xsl:apply-templates mode="create_params"/> - </xsl:template> --- 120,123 ---- |
From: Gerard F. <ger...@us...> - 2001-08-03 21:32:41
|
Update of /cvsroot/kuml/kuml/libkuml/mof In directory usw-pr-cvs1:/tmp/cvs-serv29039 Added Files: test_client.cpp Log Message: Had forgotten to add test_client source file. VS: Committing in . VS: VS: Added Files: VS: test_client.cpp VS: ---------------------------------------------------------------------- ***** Error reading new file: [Errno 2] No such file or directory: 'test_client.cpp' |
From: Gerard F. <ger...@us...> - 2001-08-03 02:03:08
|
Update of /cvsroot/kuml/kuml/libkuml/mof In directory usw-pr-cvs1:/tmp/cvs-serv22886 Modified Files: BUILD ChangeLog Generic.cpp Generic.hh Makefile Reflective_impl.h RepoManager.cpp RepoManager.hh RepoManager.t.cpp mCorba.cpp mCorba.hh mCorba.i Log Message: 2001-8-3 Gerard Flynn <ger...@fr...> * Added test_client * Updated running instructions in BUILD file * Added startns.sh script to start CORBA Naming Service * Created scripts directory * Completed CORBA server * Added RepoManager::publishObjects * Fixed problem with management of p_ref_object in GenericBaseObject * Added activateRepository method to RepoManager VS: Committing in . VS: VS: Modified Files: VS: BUILD ChangeLog Generic.cpp Generic.hh Makefile VS: Reflective_impl.h RepoManager.cpp RepoManager.hh VS: RepoManager.t.cpp mCorba.cpp mCorba.hh mCorba.i VS: Added Files: VS: scripts/startns.sh VS: ---------------------------------------------------------------------- Index: BUILD =================================================================== RCS file: /cvsroot/kuml/kuml/libkuml/mof/BUILD,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** BUILD 2001/07/02 21:26:22 1.3 --- BUILD 2001/08/03 02:03:05 1.4 *************** *** 24,29 **** Running ------------ ! cpp mof.idl | RepoManager.t This will produce a very large number of debugging messages as the MOF IDL ! is parsed and the implementation classes created. \ No newline at end of file --- 24,35 ---- Running ------------ ! In order to run the test server, the CORBA Naming Service demon must be running. ! This can be started with the script startns.sh. + You must then tell the server how to find the Naming Service. For example : + + cpp mof.idl | RepoManager.t -ORBNamingAddr inet:localhost:12456 + This will produce a very large number of debugging messages as the MOF IDL ! is parsed and the implementation classes created. The server will then ! enter the ORB run loop and will be waiting to answer queries. \ No newline at end of file Index: ChangeLog =================================================================== RCS file: /cvsroot/kuml/kuml/libkuml/mof/ChangeLog,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** ChangeLog 2001/07/15 11:14:31 1.4 --- ChangeLog 2001/08/03 02:03:05 1.5 *************** *** 1,4 **** --- 1,14 ---- $Header$ + 2001-8-3 Gerard Flynn <ger...@fr...> + * Added test_client + * Updated running instructions in BUILD file + * Added startns.sh script to start CORBA Naming Service + * Created scripts directory + * Completed CORBA server + * Added RepoManager::publishObjects + * Fixed problem with management of p_ref_object in GenericBaseObject + * Added activateRepository method to RepoManager + 2001-7-15 Gerard Flynn <ger...@fr...> * Hacked GenericStructuralFeature::checkType to always return true for Index: Generic.cpp =================================================================== RCS file: /cvsroot/kuml/kuml/libkuml/mof/Generic.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** Generic.cpp 2001/07/15 11:14:31 1.4 --- Generic.cpp 2001/08/03 02:03:05 1.5 *************** *** 64,67 **** --- 64,68 ---- } + GenericBaseObject::baseObjVect GenericBaseObject::s_allBaseObjects; GenericBaseObject::GenericBaseObject( const string& name, *************** *** 69,72 **** --- 70,74 ---- :m_name(name), p_meta_object(meta_object), + p_servant(0), m_closed(false) { *************** *** 77,80 **** --- 79,83 ---- assert( !CORBA::is_nil( poa.in() ) ); cerr << "After assert" << endl; + cerr << "Creating reference : repoId = " << repoId << endl; CORBA::Object_var obj = poa->create_reference( repoId.c_str() ); *************** *** 88,91 **** --- 91,95 ---- Reflective::RefBaseObject::_duplicate( refobj.in() ); cerr << "After duplicate" << endl; + s_allBaseObjects.push_back( this ); } *************** *** 147,151 **** Reflective::RefBaseObject_ptr GenericBaseObject::ref_object() { ! return p_ref_object.out(); } --- 151,155 ---- Reflective::RefBaseObject_ptr GenericBaseObject::ref_object() { ! return Reflective::RefBaseObject::_duplicate( p_ref_object ); } *************** *** 155,158 **** --- 159,175 ---- } + RefBaseObject_impl* GenericBaseObject::getServant() + { + if( ! p_servant ) { + createServant(); + } + return p_servant; + } + + void GenericBaseObject::createServant() + { + p_servant = new RefBaseObject_impl( this ); + } + packageMap GenericPackage::s_topLevelPackages; *************** *** 540,543 **** --- 557,565 ---- } + void GenericPackage::createServant() + { + p_servant = new RefPackage_impl( this ); + } + GenericValueCollector::GenericValueCollector() {} *************** *** 1108,1111 **** --- 1130,1139 ---- } + void GenericClassProxy::createServant() + { + p_servant = new RefObject_impl( this ); + } + + GenericInstance::GenericInstance( const string& name, GenericClassProxy* proxy, *************** *** 1191,1194 **** --- 1219,1228 ---- } + void GenericInstance::createServant() + { + p_servant = new RefObject_impl( this ); + } + + GenericFeature::GenericFeature( const string& name, featureKind kind, *************** *** 1210,1213 **** --- 1244,1253 ---- } + void GenericFeature::createServant() + { + p_servant = 0; + } + + GenericStructuralFeature::GenericStructuralFeature( const string& name, const CORBA::TypeCode* base_type, *************** *** 1687,1689 **** --- 1727,1734 ---- { createMetaObject( metaModelMgr->getOperation_ClassProxy() ); + } + + void GenericAssociation::createServant() + { + p_servant = 0; } Index: Generic.hh =================================================================== RCS file: /cvsroot/kuml/kuml/libkuml/mof/Generic.hh,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** Generic.hh 2001/07/15 11:14:31 1.4 --- Generic.hh 2001/08/03 02:03:05 1.5 *************** *** 129,132 **** --- 129,136 ---- class GenericBaseObject { + public: + typedef vector<GenericBaseObject*> baseObjVect; + + static baseObjVect s_allBaseObjects; public: // Construction GenericBaseObject( const string& name, *************** *** 160,165 **** --- 164,175 ---- bool isClosed() const; + RefBaseObject_impl* getServant(); + protected: + virtual void createServant(); + GenericInstance* p_meta_object; + + RefBaseObject_impl* p_servant; private: *************** *** 168,172 **** string m_name; ! Reflective::RefBaseObject_var p_ref_object; bool m_closed; --- 178,182 ---- string m_name; ! Reflective::RefBaseObject_ptr p_ref_object; bool m_closed; *************** *** 244,247 **** --- 254,260 ---- GenericPackage* ref_package( const string& mof_id_string ); + protected: + virtual void createServant(); + private: string m_name; *************** *** 462,465 **** --- 475,481 ---- GenericInstance* create_instance( const Reflective::ValueTypeList& args ); + protected: + virtual void createServant(); + private: bool m_designatorsValid; *************** *** 518,521 **** --- 534,540 ---- void fillInInstance( const Reflective::ValueTypeList& args ); + protected: + virtual void createServant(); + private: GenericClassProxy* p_proxy; *************** *** 529,532 **** --- 548,554 ---- virtual ~GenericAssociation() {} + + protected: + virtual void createServant(); }; *************** *** 722,725 **** --- 744,751 ---- featureKind kind() const; + + protected: + virtual void createServant(); + private: featureKind m_kind; Index: Makefile =================================================================== RCS file: /cvsroot/kuml/kuml/libkuml/mof/Makefile,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** Makefile 2001/07/15 11:14:31 1.4 --- Makefile 2001/08/03 02:03:05 1.5 *************** *** 1,4 **** INCLUDES = -I/usr/include -I/usr/local/include/mico ! LIBS = -luuid -ldl -L/usr/local/lib -lmico2.3.5 IDLCOMPILER = /usr/local/bin/idl --- 1,4 ---- INCLUDES = -I/usr/include -I/usr/local/include/mico ! LIBS = -luuid -ldl -L/usr/local/lib -lmico2.3.5 -lmicocoss2.3.5 IDLCOMPILER = /usr/local/bin/idl *************** *** 9,13 **** CPPFLAGS = ${CXXFLAGS} ! all : RegularExpression.t RepoManager.t #Generic.t : Generic.t.o Generic.o Reflective.o Reflective_impl.o GenericTest.o GenericTest.h \ --- 9,13 ---- CPPFLAGS = ${CXXFLAGS} ! all : RegularExpression.t RepoManager.t test_client #Generic.t : Generic.t.o Generic.o Reflective.o Reflective_impl.o GenericTest.o GenericTest.h \ *************** *** 38,42 **** --- 38,47 ---- parser.o treewalker.o yacc.o + test_client_OBJECTS = test_client.o Reflective.o mCorba.o + RepoManager.t : ${RepoManager_t_OBJECTS} + g++ -o $@ $^ ${LIBS} + + test_client : ${test_client_OBJECTS} g++ -o $@ $^ ${LIBS} Index: Reflective_impl.h =================================================================== RCS file: /cvsroot/kuml/kuml/libkuml/mof/Reflective_impl.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** Reflective_impl.h 2001/06/22 03:42:04 1.1 --- Reflective_impl.h 2001/08/03 02:03:05 1.2 *************** *** 24,28 **** /* ****************************************************************************/ ! /* $Header$ */ --- 24,30 ---- /* ****************************************************************************/ ! /* ! $Header$ ! */ Index: RepoManager.cpp =================================================================== RCS file: /cvsroot/kuml/kuml/libkuml/mof/RepoManager.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** RepoManager.cpp 2001/07/15 11:14:31 1.4 --- RepoManager.cpp 2001/08/03 02:03:05 1.5 *************** *** 135,139 **** void RepoManager::activateRepository() ! {} --- 135,202 ---- void RepoManager::activateRepository() ! { ! cerr << "Call to RepoManager::activateRepository()" << endl; ! GenericBaseObject::baseObjVect::iterator p; ! for( p = GenericBaseObject::s_allBaseObjects.begin(); ! p != GenericBaseObject::s_allBaseObjects.end(); ! ++p ) ! { ! if( (*p)->getServant() ) { ! cerr << "Activating : " << (*p)->name() << endl; ! PortableServer::ObjectId_var oid = ! GenericPOAManager::thePOAManager()->getPOA()->reference_to_id( (*p)->ref_object() ); ! cerr << "After reference_to_id" << endl; ! GenericPOAManager::thePOAManager()->getPOA()->activate_object_with_id( oid.in(), ! (*p)->getServant() ); ! cerr << "After activate_object_with_id" << endl; ! } ! } ! ! mCorba::activerPOA(); ! publishObjects(); + cerr << "End RepoManager::activateRepository()" << endl; + } + + void RepoManager::publishObjects() + { + cerr << "Call to RepoManager::publishObjects()" << endl; + try { + // Publish the Model package. + GenericPackage* model = GenericPackage::findTopLevelPackage( "Model" ); + assert( model ); + Reflective::RefBaseObject_var model_var = model->ref_object(); + + // Create the kuml context. + CosNaming::Name n; + n.length( 1 ); + n[0].id = CORBA::string_dup( "KUML" ); + try { + CosNaming::NamingContext_var nc = + mCorba::inc->bind_new_context( n ); + } + catch( const CosNaming::NamingContext::AlreadyBound & ) { + // No problem, context already exists. + } + + n.length( 2 ); + n[1].id = CORBA::string_dup( "MOF" ); + try { + CosNaming::NamingContext_var nc = + mCorba::inc->bind_new_context( n ); + } + catch( const CosNaming::NamingContext::AlreadyBound & ) { + // No problem, context already exists. + } + + n.length( 3 ); + n[2].id = CORBA::string_dup( "MODEL" ); + mCorba::inc->rebind( n, model_var.in() ); + } + catch( ... ) { + cerr << "An exception occured in RepoManager::publishObjects" << endl; + exit( -1 ); + } + cerr << "End RepoManager::publishObjects()" << endl; + } Index: RepoManager.hh =================================================================== RCS file: /cvsroot/kuml/kuml/libkuml/mof/RepoManager.hh,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** RepoManager.hh 2001/07/15 11:14:31 1.4 --- RepoManager.hh 2001/08/03 02:03:06 1.5 *************** *** 24,28 **** /* ****************************************************************************/ ! /* $Header$ */ #ifndef RepoManager_H_IS_INCLUDED --- 24,30 ---- /* ****************************************************************************/ ! /* ! $Header$ ! */ #ifndef RepoManager_H_IS_INCLUDED *************** *** 59,62 **** --- 61,66 ---- void buildMetaModel(); + + void publishObjects(); private: stageType m_stage; Index: RepoManager.t.cpp =================================================================== RCS file: /cvsroot/kuml/kuml/libkuml/mof/RepoManager.t.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** RepoManager.t.cpp 2001/07/15 11:14:31 1.3 --- RepoManager.t.cpp 2001/08/03 02:03:06 1.4 *************** *** 31,43 **** --- 31,55 ---- #include <iostream> #include <cstdio> + #include <cstdlib> #include "mCorba.hh" int main( int argc, char* argv[] ) { + cerr << "In main" << endl; mCorba::init( argc, argv ); + cerr << "After call to mCorba::init" << endl; + try { + mCorba::initServices(); + } + catch( ... ) { + cerr << "An exception occurred while attempting to initialize services" << endl; + exit( -1 ); + } RepoManager rman; rman.setIDLInputFile( stdin ); rman.buildImplementation(); + rman.activateRepository(); + mCorba::orb->run(); return 0; } Index: mCorba.cpp =================================================================== RCS file: /cvsroot/kuml/kuml/libkuml/mof/mCorba.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** mCorba.cpp 2001/07/15 11:14:31 1.3 --- mCorba.cpp 2001/08/03 02:03:06 1.4 *************** *** 35,39 **** #include <cstring> ! #include "Generic.hh" bool mCorba::orb_initialise = false; --- 35,40 ---- #include <cstring> ! //#include "Generic.hh" ! #include "KumlUtilities.hh" bool mCorba::orb_initialise = false; *************** *** 52,56 **** { initOrb( argc, argv ); ! initServices(); } --- 53,57 ---- { initOrb( argc, argv ); ! // initServices(); } *************** *** 60,64 **** orb = CORBA::ORB_init( argc, argv ); if( CORBA::is_nil( orb.in() ) ) ! throw GenericException("Erreur d'initialisation de l'orb." ); // resolve_init lance une exception s'il doit retourner une referennce nil. // CORBA::Object_var obj = resolve_init<CORBA::Object>( orb.in(), "RootPOA" ); --- 61,65 ---- orb = CORBA::ORB_init( argc, argv ); if( CORBA::is_nil( orb.in() ) ) ! throw KumlUtilities::KumlException("Erreur d'initialisation de l'orb." ); // resolve_init lance une exception s'il doit retourner une referennce nil. // CORBA::Object_var obj = resolve_init<CORBA::Object>( orb.in(), "RootPOA" ); *************** *** 79,83 **** { if( !orb_initialise ) { ! throw GenericException("Erreur: ORB non-initialise"); } poa_mgr->activate(); --- 80,84 ---- { if( !orb_initialise ) { ! throw KumlUtilities::KumlException("Erreur: ORB non-initialise"); } poa_mgr->activate(); *************** *** 87,93 **** { if( !orb_initialise ) { ! throw GenericException("Erreur: ORB non-initialise"); } ! PortableServer::LifespanPolicy_var policy = poa_racine->create_lifespan_policy( PortableServer:: PERSISTENT ); return policy._retn(); } --- 88,95 ---- { if( !orb_initialise ) { ! throw KumlUtilities::KumlException("Erreur: ORB non-initialise"); } ! PortableServer::LifespanPolicy_var policy = ! poa_racine->create_lifespan_policy( PortableServer:: PERSISTENT ); return policy._retn(); } *************** *** 96,102 **** { if( !orb_initialise ) { ! throw GenericException("Erreur: ORB non-initialise"); } ! PortableServer::LifespanPolicy_var policy = poa_racine->create_lifespan_policy( PortableServer:: TRANSIENT ); return policy._retn(); } --- 98,105 ---- { if( !orb_initialise ) { ! throw KumlUtilities::KumlException("Erreur: ORB non-initialise"); } ! PortableServer::LifespanPolicy_var policy = ! poa_racine->create_lifespan_policy( PortableServer:: TRANSIENT ); return policy._retn(); } *************** *** 105,109 **** { if( !orb_initialise ) { ! throw GenericException("Erreur: ORB non-initialise"); } PortableServer::IdAssignmentPolicy_var policy = --- 108,112 ---- { if( !orb_initialise ) { ! throw KumlUtilities::KumlException("Erreur: ORB non-initialise"); } PortableServer::IdAssignmentPolicy_var policy = *************** *** 115,119 **** { if( !orb_initialise ) { ! throw GenericException("Erreur: ORB non-initialise"); } PortableServer::IdAssignmentPolicy_var policy = --- 118,122 ---- { if( !orb_initialise ) { ! throw KumlUtilities::KumlException("Erreur: ORB non-initialise"); } PortableServer::IdAssignmentPolicy_var policy = *************** *** 125,129 **** { if( !orb_initialise ) { ! throw GenericException("Erreur: ORB non-initialise"); } PortableServer::IdUniquenessPolicy_var policy = --- 128,132 ---- { if( !orb_initialise ) { ! throw KumlUtilities::KumlException("Erreur: ORB non-initialise"); } PortableServer::IdUniquenessPolicy_var policy = *************** *** 135,139 **** { if( !orb_initialise ) { ! throw GenericException("Erreur: ORB non-initialise"); } PortableServer::IdUniquenessPolicy_var policy = --- 138,142 ---- { if( !orb_initialise ) { ! throw KumlUtilities::KumlException("Erreur: ORB non-initialise"); } PortableServer::IdUniquenessPolicy_var policy = *************** *** 145,149 **** { if( !orb_initialise ) { ! throw GenericException("Erreur: ORB non-initialise"); } PortableServer::ImplicitActivationPolicy_var policy = --- 148,152 ---- { if( !orb_initialise ) { ! throw KumlUtilities::KumlException("Erreur: ORB non-initialise"); } PortableServer::ImplicitActivationPolicy_var policy = *************** *** 155,159 **** { if( !orb_initialise ) { ! throw GenericException("Erreur: ORB non-initialise"); } PortableServer::ImplicitActivationPolicy_var policy = --- 158,162 ---- { if( !orb_initialise ) { ! throw KumlUtilities::KumlException("Erreur: ORB non-initialise"); } PortableServer::ImplicitActivationPolicy_var policy = *************** *** 165,169 **** { if( !orb_initialise ) { ! throw GenericException("Erreur: ORB non-initialise"); } PortableServer::RequestProcessingPolicy_var policy = --- 168,172 ---- { if( !orb_initialise ) { ! throw KumlUtilities::KumlException("Erreur: ORB non-initialise"); } PortableServer::RequestProcessingPolicy_var policy = *************** *** 176,180 **** { if( !orb_initialise ) { ! throw GenericException("Erreur: ORB non-initialise"); } PortableServer::RequestProcessingPolicy_var policy = --- 179,183 ---- { if( !orb_initialise ) { ! throw KumlUtilities::KumlException("Erreur: ORB non-initialise"); } PortableServer::RequestProcessingPolicy_var policy = *************** *** 187,191 **** { if( !orb_initialise ) { ! throw GenericException("Erreur: ORB non-initialise"); } PortableServer::RequestProcessingPolicy_var policy = --- 190,194 ---- { if( !orb_initialise ) { ! throw KumlUtilities::KumlException("Erreur: ORB non-initialise"); } PortableServer::RequestProcessingPolicy_var policy = *************** *** 198,202 **** { if( !orb_initialise ) { ! throw GenericException("Erreur: ORB non-initialise"); } PortableServer::ServantRetentionPolicy_var policy = --- 201,205 ---- { if( !orb_initialise ) { ! throw KumlUtilities::KumlException("Erreur: ORB non-initialise"); } PortableServer::ServantRetentionPolicy_var policy = *************** *** 209,213 **** { if( !orb_initialise ) { ! throw GenericException("Erreur: ORB non-initialise"); } PortableServer::ServantRetentionPolicy_var policy = --- 212,216 ---- { if( !orb_initialise ) { ! throw KumlUtilities::KumlException("Erreur: ORB non-initialise"); } PortableServer::ServantRetentionPolicy_var policy = *************** *** 220,224 **** { if( !orb_initialise ) { ! throw GenericException("Erreur: ORB non-initialise"); } PortableServer::ThreadPolicy_var policy = --- 223,227 ---- { if( !orb_initialise ) { ! throw KumlUtilities::KumlException("Erreur: ORB non-initialise"); } PortableServer::ThreadPolicy_var policy = *************** *** 231,235 **** { if( !orb_initialise ) { ! throw GenericException("Erreur: ORB non-initialise"); } PortableServer::ThreadPolicy_var policy = --- 234,238 ---- { if( !orb_initialise ) { ! throw KumlUtilities::KumlException("Erreur: ORB non-initialise"); } PortableServer::ThreadPolicy_var policy = *************** *** 241,245 **** void mCorba::initServices() { ! // inc = resolve_init<CosNaming::NamingContext>( orb.in(), "NameService" ); } --- 244,248 ---- void mCorba::initServices() { ! inc = resolve_init<CosNaming::NamingContext>( orb.in(), "NameService" ); } Index: mCorba.hh =================================================================== RCS file: /cvsroot/kuml/kuml/libkuml/mof/mCorba.hh,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** mCorba.hh 2001/07/15 11:14:31 1.3 --- mCorba.hh 2001/08/03 02:03:06 1.4 *************** *** 46,50 **** template<class T> ! static typename T::_ptr_type resolve_name( CosNaming::NamingContext_ptr nc, const CosNaming::Name& name ); --- 46,51 ---- template<class T> ! // static typename T::_ptr_type ! static T* resolve_name( CosNaming::NamingContext_ptr nc, const CosNaming::Name& name ); Index: mCorba.i =================================================================== RCS file: /cvsroot/kuml/kuml/libkuml/mof/mCorba.i,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** mCorba.i 2001/06/22 03:42:04 1.1 --- mCorba.i 2001/08/03 02:03:06 1.2 *************** *** 24,28 **** /* ****************************************************************************/ ! /* $Header$ */ /* -*- C++ -*- */ --- 24,30 ---- /* ****************************************************************************/ ! /* ! $Header$ ! */ /* -*- C++ -*- */ *************** *** 66,70 **** template<class T> ! inline typename T::_ptr_type mCorba::resolve_name( CosNaming::NamingContext_ptr nc, const CosNaming::Name& name ) --- 68,73 ---- template<class T> ! //inline typename T::_ptr_type ! inline T* mCorba::resolve_name( CosNaming::NamingContext_ptr nc, const CosNaming::Name& name ) |
From: Gerard F. <ger...@us...> - 2001-08-03 02:03:08
|
Update of /cvsroot/kuml/kuml/libkuml/mof/scripts In directory usw-pr-cvs1:/tmp/cvs-serv22886/scripts Added Files: startns.sh Log Message: 2001-8-3 Gerard Flynn <ger...@fr...> * Added test_client * Updated running instructions in BUILD file * Added startns.sh script to start CORBA Naming Service * Created scripts directory * Completed CORBA server * Added RepoManager::publishObjects * Fixed problem with management of p_ref_object in GenericBaseObject * Added activateRepository method to RepoManager VS: Committing in . VS: VS: Modified Files: VS: BUILD ChangeLog Generic.cpp Generic.hh Makefile VS: Reflective_impl.h RepoManager.cpp RepoManager.hh VS: RepoManager.t.cpp mCorba.cpp mCorba.hh mCorba.i VS: Added Files: VS: scripts/startns.sh VS: ---------------------------------------------------------------------- --- NEW FILE --- #!/bin/sh ADDR=inet:localhost:12456 RC="-ORBNamingAddr $ADDR" echo "Starting naming service" nsd -ORBIIOPAddr $ADDR & |
From: Gerard F. <ger...@us...> - 2001-08-03 01:12:34
|
Update of /cvsroot/kuml/kuml/libkuml/mof/scripts In directory usw-pr-cvs1:/tmp/cvs-serv26309/scripts Log Message: Directory /cvsroot/kuml/kuml/libkuml/mof/scripts added to the repository |
From: Chris M. <zm...@us...> - 2001-07-26 21:18:45
|
Update of /cvsroot/kuml/kuml/libkuml/uml/tools In directory usw-pr-cvs1:/tmp/cvs-serv25543 Modified Files: common_code.xsl gen_class_ccs.xsl gen_class_hs.xsl gen_proxy_hs.xsl Log Message: The red eyed release. The classes compile. Index: common_code.xsl =================================================================== RCS file: /cvsroot/kuml/kuml/libkuml/uml/tools/common_code.xsl,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** common_code.xsl 2001/07/09 22:38:30 1.6 --- common_code.xsl 2001/07/26 21:18:43 1.7 *************** *** 175,178 **** --- 175,192 ---- + <!-- Template for dealing with C++ reserved words. + --> + + + <xsl:template name="reserved-word-processing"> + <xsl:param name="the_word"/> + <!-- Hack!! Note this is incomplete. :-) --> + <xsl:if test='$the_word = "namespace" or $the_word = "template"'> + <xsl:text>_cxx_</xsl:text> + </xsl:if> + <xsl:value-of select="$the_word"/> + </xsl:template> + + <!-- Template for mangling names. Special care must be taken to process idl_substitute name tags. *************** *** 302,305 **** --- 316,394 ---- <xsl:template match="Model:Class" mode="type_name"> + + <xsl:variable name="package_name"> + <xsl:call-template name="toName"> + <xsl:with-param name="text"> + <xsl:value-of select="ancestor::Model:Package/@name"/> + </xsl:with-param> + <xsl:with-param name="position" select="1"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="class_name"> + <xsl:call-template name="get_name"> + <xsl:with-param name="the_xmi_id"> + <xsl:value-of select="@xmi.id"/> + </xsl:with-param> + <xsl:with-param name="the_name"> + <xsl:value-of select="@name"/> + </xsl:with-param> + </xsl:call-template> + </xsl:variable> + + <xsl:value-of select="$package_name"/> + <xsl:text>::</xsl:text> + <xsl:value-of select="$class_name"/> + <xsl:text>_ptr</xsl:text> + + </xsl:template> + + + <!-- Templates for finding CORBA IDL set type implementations. --> + <!-- These use the type_set_name mode and setup the CORBA_set_type variable. --> + + + <xsl:template + match="Model:DataType.typeCode | XMI.CorbaTypeCode" + mode="type_set_name"> + <xsl:apply-templates mode="type_set_name"/> + </xsl:template> + + + <xsl:template match="XMI.CorbaTcBoolean" mode="type_set_name"> + <xsl:text>CORBA::Boolean</xsl:text> + </xsl:template> + + + <xsl:template match="XMI.CorbaTcString" mode="type_set_name"> + <xsl:text>Core::String</xsl:text> + </xsl:template> + + + <xsl:template match="XMI.CorbaTcAlias" mode="type_set_name"> + + <xsl:variable name="package_name"> + <xsl:call-template name="toName"> + <xsl:with-param name="text"> + <xsl:value-of select="ancestor::Model:Package/@name"/> + </xsl:with-param> + <xsl:with-param name="position" select="1"/> + </xsl:call-template> + </xsl:variable> + + <!-- xsl:value-of select="$package_name"/ --> + <xsl:text>Core::</xsl:text> + <xsl:value-of select="@xmi.tcName"/> + + </xsl:template> + + + <xsl:template match="XMI.CorbaTcEnum" mode="type_set_name"> + <xsl:text>DataTypes::</xsl:text> + <xsl:value-of select="@xmi.tcName"/> + </xsl:template> + + + <xsl:template match="Model:Class" mode="type_set_name"> <xsl:variable name="package_name"> Index: gen_class_ccs.xsl =================================================================== RCS file: /cvsroot/kuml/kuml/libkuml/uml/tools/gen_class_ccs.xsl,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** gen_class_ccs.xsl 2001/07/21 23:01:33 1.5 --- gen_class_ccs.xsl 2001/07/26 21:18:43 1.6 *************** *** 155,158 **** --- 155,170 ---- select="./Model:StructuralFeature.multiplicity/XMI.field[position()=4]"/> + <!-- Define the value of the CORBA_type variable by applying templates + in the type_name mode to the descendant of the root node whos xmi.id + attribute matches type_ref. + --> + <xsl:variable name="CORBA_set_type"> + <xsl:if test="$upper = -1 or $upper > 1"> + <xsl:apply-templates + select='/descendant::*[@xmi.id=$type_ref]' + mode="type_set_name"/> + </xsl:if> + </xsl:variable> + <xsl:if test='$lower=0 and $upper=1'> *************** *** 243,255 **** --> ! <xsl:value-of select="$CORBA_type"/> ! <xsl:text> </xsl:text> <xsl:value-of select="$attr_name"/> <xsl:text>() </xsl:text> ! <xsl:text> throw(; </xsl:text> <xsl:text> ::CORBA::SystemException, </xsl:text> ! <xsl:text> ::Reflective::MofError </xsl:text> <xsl:text> </xsl:text> --- 255,269 ---- --> ! <xsl:value-of select="$CORBA_set_type"/> ! <xsl:text>Set* </xsl:text> <xsl:value-of select="$attr_name"/> <xsl:text>() </xsl:text> ! <xsl:text> throw( </xsl:text> <xsl:text> ::CORBA::SystemException, </xsl:text> ! <xsl:text> ::Reflective::MofError) </xsl:text> + <xsl:text>{ } </xsl:text> + <xsl:text> </xsl:text> *************** *** 294,298 **** <xsl:value-of select="$attr_name"/> <xsl:text>( const </xsl:text> ! <xsl:value-of select="$CORBA_type"/> <xsl:text>Set& new_value ) </xsl:text> --- 308,312 ---- <xsl:value-of select="$attr_name"/> <xsl:text>( const </xsl:text> ! <xsl:value-of select="$CORBA_set_type"/> <xsl:text>Set& new_value ) </xsl:text> *************** *** 366,370 **** <xsl:text> throw( </xsl:text> <xsl:text> ::CORBA::SystemException, </xsl:text> ! <xsl:text> ::Reflective::NotFound,; </xsl:text> <xsl:text> ::Reflective::MofError) </xsl:text> --- 380,384 ---- <xsl:text> throw( </xsl:text> <xsl:text> ::CORBA::SystemException, </xsl:text> ! <xsl:text> ::Reflective::NotFound, </xsl:text> <xsl:text> ::Reflective::MofError) </xsl:text> *************** *** 420,424 **** <xsl:text> throw( </xsl:text> <xsl:text> ::CORBA::SystemException, </xsl:text> ! <xsl:text> ::Reflective::NotFound,; </xsl:text> <xsl:text> ::Reflective::MofError) </xsl:text> --- 434,438 ---- <xsl:text> throw( </xsl:text> <xsl:text> ::CORBA::SystemException, </xsl:text> ! <xsl:text> ::Reflective::NotFound, </xsl:text> <xsl:text> ::Reflective::MofError) </xsl:text> *************** *** 446,450 **** <xsl:text> throw( </xsl:text> <xsl:text> ::CORBA::SystemException, </xsl:text> ! <xsl:text> ::Reflective::NotFound,; </xsl:text> <xsl:text> ::Reflective::MofError) </xsl:text> --- 460,464 ---- <xsl:text> throw( </xsl:text> <xsl:text> ::CORBA::SystemException, </xsl:text> ! <xsl:text> ::Reflective::NotFound, </xsl:text> <xsl:text> ::Reflective::MofError) </xsl:text> *************** *** 470,474 **** <xsl:text> throw( </xsl:text> <xsl:text> ::CORBA::SystemException, </xsl:text> ! <xsl:text> ::Reflective::NotFound,; </xsl:text> <xsl:text> ::Reflective::MofError) </xsl:text> --- 484,488 ---- <xsl:text> throw( </xsl:text> <xsl:text> ::CORBA::SystemException, </xsl:text> ! <xsl:text> ::Reflective::NotFound, </xsl:text> <xsl:text> ::Reflective::MofError) </xsl:text> *************** *** 493,497 **** <xsl:text> throw( </xsl:text> <xsl:text> ::CORBA::SystemException, </xsl:text> ! <xsl:text> ::Reflective::NotFound,; </xsl:text> <xsl:text> ::Reflective::MofError) </xsl:text> --- 507,511 ---- <xsl:text> throw( </xsl:text> <xsl:text> ::CORBA::SystemException, </xsl:text> ! <xsl:text> ::Reflective::NotFound, </xsl:text> <xsl:text> ::Reflective::MofError) </xsl:text> *************** *** 531,538 **** </xsl:variable> <xsl:variable name="ref_name"> <xsl:call-template name="to_name"> <xsl:with-param name="text"> ! <xsl:value-of select="@name"/> </xsl:with-param> <xsl:with-param name="position" select="1"/> --- 545,563 ---- </xsl:variable> + <xsl:variable name="reference"> + <xsl:call-template name="get_name"> + <xsl:with-param name="the_xmi_id"> + <xsl:value-of select="@xmi.id"/> + </xsl:with-param> + <xsl:with-param name="the_name"> + <xsl:value-of select="@name"/> + </xsl:with-param> + </xsl:call-template> + </xsl:variable> + <xsl:variable name="ref_name"> <xsl:call-template name="to_name"> <xsl:with-param name="text"> ! <xsl:value-of select="$reference"/> </xsl:with-param> <xsl:with-param name="position" select="1"/> *************** *** 653,657 **** <xsl:value-of select="$class_name"/> <xsl:text>_impl::</xsl:text> ! <xsl:value-of select="$ref_name"/> <xsl:text>() </xsl:text> --- 678,688 ---- <xsl:value-of select="$class_name"/> <xsl:text>_impl::</xsl:text> ! ! <xsl:call-template name="reserved-word-processing"> ! <xsl:with-param name="the_word"> ! <xsl:value-of select="$ref_name"/> ! </xsl:with-param> ! </xsl:call-template> ! <xsl:text>() </xsl:text> *************** *** 676,680 **** <xsl:text> return assoc_proxy-></xsl:text> ! <xsl:value-of select="$ref_name"/> <xsl:text>( _this() ); </xsl:text> --- 707,717 ---- <xsl:text> return assoc_proxy-></xsl:text> ! ! <xsl:call-template name="reserved-word-processing"> ! <xsl:with-param name="the_word"> ! <xsl:value-of select="$ref_name"/> ! </xsl:with-param> ! </xsl:call-template> ! <xsl:text>( _this() ); </xsl:text> *************** *** 697,701 **** <xsl:value-of select="$class_name"/> <xsl:text>_impl::</xsl:text> ! <xsl:value-of select="$ref_name"/> <xsl:text>() </xsl:text> --- 734,744 ---- <xsl:value-of select="$class_name"/> <xsl:text>_impl::</xsl:text> ! ! <xsl:call-template name="reserved-word-processing"> ! <xsl:with-param name="the_word"> ! <xsl:value-of select="$ref_name"/> ! </xsl:with-param> ! </xsl:call-template> ! <xsl:text>() </xsl:text> *************** *** 718,722 **** <xsl:text> return assoc_proxy-></xsl:text> ! <xsl:value-of select="$ref_name"/> <xsl:text>( _this() ); </xsl:text> --- 761,771 ---- <xsl:text> return assoc_proxy-></xsl:text> ! ! <xsl:call-template name="reserved-word-processing"> ! <xsl:with-param name="the_word"> ! <xsl:value-of select="$ref_name"/> ! </xsl:with-param> ! </xsl:call-template> ! <xsl:text>( _this() ); </xsl:text> *************** *** 740,744 **** <xsl:value-of select="$class_name"/> <xsl:text>_impl::</xsl:text> ! <xsl:value-of select="$ref_name"/> <xsl:text>() </xsl:text> --- 789,799 ---- <xsl:value-of select="$class_name"/> <xsl:text>_impl::</xsl:text> ! ! <xsl:call-template name="reserved-word-processing"> ! <xsl:with-param name="the_word"> ! <xsl:value-of select="$ref_name"/> ! </xsl:with-param> ! </xsl:call-template> ! <xsl:text>() </xsl:text> *************** *** 807,814 **** <xsl:text> assoc_proxy->modify_</xsl:text> <xsl:value-of select="$ref_name"/> ! <xsl:text>( _this()-></xsl:text> ! <xsl:value-of select="$ref_name"/> ! <xsl:text>(), _this(), new_value ); </xsl:text> <xsl:text>} </xsl:text> --- 862,895 ---- <xsl:text> assoc_proxy->modify_</xsl:text> <xsl:value-of select="$ref_name"/> ! ! <xsl:choose> ! <xsl:when test='$end_a_or_b = "A_END"'> ! ! <xsl:text>( _this()-></xsl:text> ! ! <xsl:call-template name="reserved-word-processing"> ! <xsl:with-param name="the_word"> ! <xsl:value-of select="$ref_name"/> ! </xsl:with-param> ! </xsl:call-template> ! ! <xsl:text>(), _this(), new_value ); </xsl:text> + </xsl:when> + <xsl:otherwise> + + <xsl:text>( _this(), _this()-></xsl:text> + + <xsl:call-template name="reserved-word-processing"> + <xsl:with-param name="the_word"> + <xsl:value-of select="$ref_name"/> + </xsl:with-param> + </xsl:call-template> + + <xsl:text>(), new_value ); </xsl:text> + + </xsl:otherwise> + </xsl:choose> + <xsl:text>} </xsl:text> Index: gen_class_hs.xsl =================================================================== RCS file: /cvsroot/kuml/kuml/libkuml/uml/tools/gen_class_hs.xsl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** gen_class_hs.xsl 2001/06/18 22:57:27 1.4 --- gen_class_hs.xsl 2001/07/26 21:18:43 1.5 *************** *** 356,365 **** <!-- Define the value of the CORBA_type variable by applying templates ! in the type_name mode to the Model:DataType.typeCode child of a ! Model:DataType descendant of the root node whos xmi.id attribute ! matches type_ref. --> <xsl:variable name="CORBA_type"> ! <xsl:apply-templates select='/descendant::*[@xmi.id=$type_ref]' mode="type_name"/> </xsl:variable> --- 356,366 ---- <!-- Define the value of the CORBA_type variable by applying templates ! in the type_name mode to the descendant of the root node whos xmi.id ! attribute matches type_ref. --> <xsl:variable name="CORBA_type"> ! <xsl:apply-templates ! select='/descendant::*[@xmi.id=$type_ref]' ! mode="type_name"/> </xsl:variable> *************** *** 376,379 **** --- 377,393 ---- select="./Model:StructuralFeature.multiplicity/XMI.field[position()=4]"/> + <!-- Define the value of the CORBA_type variable by applying templates + in the type_name mode to the descendant of the root node whos xmi.id + attribute matches type_ref. + --> + <xsl:variable name="CORBA_set_type"> + <xsl:if test="$upper = -1 or $upper > 1"> + <xsl:apply-templates + select='/descendant::*[@xmi.id=$type_ref]' + mode="type_set_name"/> + </xsl:if> + </xsl:variable> + + <xsl:if test='$lower=0 and $upper=1'> *************** *** 428,437 **** <xsl:text> </xsl:text> ! <xsl:value-of select="$CORBA_type"/> ! <xsl:text> </xsl:text> <xsl:value-of select="$attr_name"/> <xsl:text>() </xsl:text> ! <xsl:text> throw(; </xsl:text> <xsl:text> ::CORBA::SystemException, </xsl:text> <xsl:text> ::Reflective::MofError) </xsl:text> --- 442,451 ---- <xsl:text> </xsl:text> ! <xsl:value-of select="$CORBA_set_type"/> ! <xsl:text>Set* </xsl:text> <xsl:value-of select="$attr_name"/> <xsl:text>() </xsl:text> ! <xsl:text> throw( </xsl:text> <xsl:text> ::CORBA::SystemException, </xsl:text> <xsl:text> ::Reflective::MofError) </xsl:text> *************** *** 476,480 **** <xsl:value-of select="$attr_name"/> <xsl:text>( const </xsl:text> ! <xsl:value-of select="$CORBA_type"/> <xsl:text>Set& new_value ) </xsl:text> --- 490,494 ---- <xsl:value-of select="$attr_name"/> <xsl:text>( const </xsl:text> ! <xsl:value-of select="$CORBA_set_type"/> <xsl:text>Set& new_value ) </xsl:text> *************** *** 545,549 **** <xsl:text> throw( </xsl:text> <xsl:text> ::CORBA::SystemException, </xsl:text> ! <xsl:text> ::Reflective::NotFound,; </xsl:text> <xsl:text> ::Reflective::MofError) </xsl:text> <xsl:text> ; </xsl:text> --- 559,563 ---- <xsl:text> throw( </xsl:text> <xsl:text> ::CORBA::SystemException, </xsl:text> ! <xsl:text> ::Reflective::NotFound, </xsl:text> <xsl:text> ::Reflective::MofError) </xsl:text> <xsl:text> ; </xsl:text> *************** *** 596,600 **** <xsl:text> throw( </xsl:text> <xsl:text> ::CORBA::SystemException, </xsl:text> ! <xsl:text> ::Reflective::NotFound,; </xsl:text> <xsl:text> ::Reflective::MofError) </xsl:text> <xsl:text> ; </xsl:text> --- 610,614 ---- <xsl:text> throw( </xsl:text> <xsl:text> ::CORBA::SystemException, </xsl:text> ! <xsl:text> ::Reflective::NotFound, </xsl:text> <xsl:text> ::Reflective::MofError) </xsl:text> <xsl:text> ; </xsl:text> *************** *** 621,625 **** <xsl:text> throw( </xsl:text> <xsl:text> ::CORBA::SystemException, </xsl:text> ! <xsl:text> ::Reflective::NotFound,; </xsl:text> <xsl:text> ::Reflective::MofError) </xsl:text> <xsl:text> ; </xsl:text> --- 635,639 ---- <xsl:text> throw( </xsl:text> <xsl:text> ::CORBA::SystemException, </xsl:text> ! <xsl:text> ::Reflective::NotFound, </xsl:text> <xsl:text> ::Reflective::MofError) </xsl:text> <xsl:text> ; </xsl:text> *************** *** 644,648 **** <xsl:text> throw( </xsl:text> <xsl:text> ::CORBA::SystemException, </xsl:text> ! <xsl:text> ::Reflective::NotFound,; </xsl:text> <xsl:text> ::Reflective::MofError) </xsl:text> <xsl:text> ; </xsl:text> --- 658,662 ---- <xsl:text> throw( </xsl:text> <xsl:text> ::CORBA::SystemException, </xsl:text> ! <xsl:text> ::Reflective::NotFound, </xsl:text> <xsl:text> ::Reflective::MofError) </xsl:text> <xsl:text> ; </xsl:text> *************** *** 666,670 **** <xsl:text> throw( </xsl:text> <xsl:text> ::CORBA::SystemException, </xsl:text> ! <xsl:text> ::Reflective::NotFound,; </xsl:text> <xsl:text> ::Reflective::MofError) </xsl:text> <xsl:text> ; </xsl:text> --- 680,684 ---- <xsl:text> throw( </xsl:text> <xsl:text> ::CORBA::SystemException, </xsl:text> ! <xsl:text> ::Reflective::NotFound, </xsl:text> <xsl:text> ::Reflective::MofError) </xsl:text> <xsl:text> ; </xsl:text> *************** *** 774,783 **** <xsl:text>_ptr </xsl:text> ! <!-- Hack!! Deal with C++ reserved words (ahem) --> ! <xsl:if test='$ref_name = "namespace"'> ! <xsl:text>_cxx_</xsl:text> ! </xsl:if> - <xsl:value-of select="$ref_name"/> <xsl:text>() </xsl:text> --- 788,797 ---- <xsl:text>_ptr </xsl:text> ! <xsl:call-template name="reserved-word-processing"> ! <xsl:with-param name="the_word"> ! <xsl:value-of select="$ref_name"/> ! </xsl:with-param> ! </xsl:call-template> <xsl:text>() </xsl:text> *************** *** 803,807 **** <xsl:value-of select="$type_name"/> <xsl:text>_ptr </xsl:text> ! <xsl:value-of select="$ref_name"/> <xsl:text>() </xsl:text> --- 817,827 ---- <xsl:value-of select="$type_name"/> <xsl:text>_ptr </xsl:text> ! ! <xsl:call-template name="reserved-word-processing"> ! <xsl:with-param name="the_word"> ! <xsl:value-of select="$ref_name"/> ! </xsl:with-param> ! </xsl:call-template> ! <xsl:text>() </xsl:text> *************** *** 828,832 **** <xsl:text>Set* </xsl:text> ! <xsl:value-of select="$ref_name"/> <xsl:text>() </xsl:text> --- 848,857 ---- <xsl:text>Set* </xsl:text> ! <xsl:call-template name="reserved-word-processing"> ! <xsl:with-param name="the_word"> ! <xsl:value-of select="$ref_name"/> ! </xsl:with-param> ! </xsl:call-template> ! <xsl:text>() </xsl:text> Index: gen_proxy_hs.xsl =================================================================== RCS file: /cvsroot/kuml/kuml/libkuml/uml/tools/gen_proxy_hs.xsl,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** gen_proxy_hs.xsl 2001/06/18 22:57:27 1.8 --- gen_proxy_hs.xsl 2001/07/26 21:18:43 1.9 *************** *** 127,131 **** <xsl:template ! match="Model:DataType | Model:DataType.typeCode | XMI.CorbaTcAlias | XMI.CorbaTypeCode" mode="create_param_type_name"> <xsl:param name="collection"/> --- 127,131 ---- <xsl:template ! match="Model:DataType | Model:DataType.typeCode | XMI.CorbaTypeCode" mode="create_param_type_name"> <xsl:param name="collection"/> *************** *** 146,150 **** ! <xsl:template match="XMI.CorbaTcString" mode="create_param_type_name"> <xsl:param name="collection"/> --- 146,150 ---- ! <xsl:template match="XMI.CorbaTcAlias" mode="create_param_type_name"> <xsl:param name="collection"/> *************** *** 158,162 **** </xsl:variable> ! <xsl:variable name="type_name" select="ancestor::Model:DataType/@name"/> <xsl:choose> --- 158,162 ---- </xsl:variable> ! <xsl:variable name="type_name" select="@xmi.tcName"/> <xsl:choose> *************** *** 176,179 **** --- 176,186 ---- + <!-- If we got this far it must be xmi.id='a23' name='String' --> + <xsl:template match="XMI.CorbaTcString" mode="create_param_type_name"> + <xsl:param name="collection"/> + <xsl:text>const char*</xsl:text> + </xsl:template> + + <xsl:template match="XMI.CorbaTcEnum" mode="create_param_type_name"> <xsl:param name="collection"/> *************** *** 207,211 **** <xsl:param name="collection"/> ! <xsl:variable name="package_name" select="ancestor::Model:Package/@name"/> <xsl:variable name="class_name"> --- 214,225 ---- <xsl:param name="collection"/> ! <xsl:variable name="package_name"> ! <xsl:call-template name="toName"> ! <xsl:with-param name="text"> ! <xsl:value-of select="ancestor::Model:Package/@name"/> ! </xsl:with-param> ! <xsl:with-param name="position" select="1"/> ! </xsl:call-template> ! </xsl:variable> <xsl:variable name="class_name"> *************** *** 233,237 **** <xsl:value-of select="$class_name"/> ! <xsl:value-of select="$collection"/> </xsl:template> --- 247,258 ---- <xsl:value-of select="$class_name"/> ! <xsl:choose> ! <xsl:when test='not(string-length($collection) = 0)'> ! <xsl:value-of select="$collection"/> ! </xsl:when> ! <xsl:otherwise> ! <xsl:text>_ptr</xsl:text> ! </xsl:otherwise> ! </xsl:choose> </xsl:template> |
From: Darius S. <dst...@us...> - 2001-07-25 13:16:07
|
Update of /cvsroot/kuml/kuml/kuml_gui/src/ige/common/views In directory usw-pr-cvs1:/tmp/cvs-serv7189 Modified Files: CompositeView.cpp Log Message: Added forgotten method implementation Index: CompositeView.cpp =================================================================== RCS file: /cvsroot/kuml/kuml/kuml_gui/src/ige/common/views/CompositeView.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** CompositeView.cpp 2001/07/25 12:52:07 1.1 --- CompositeView.cpp 2001/07/25 13:16:04 1.2 *************** *** 1,3 **** ! /* Generated by Together */ #include "CompositeView.h" --- 1,19 ---- ! /*************************************************************************** ! CompositeView.cpp - description ! ------------------- ! begin : Wed Jun 25 2001 ! copyright : (C) 2001 by the kUML Team ! author : Darius Stachow ! email : sta...@in... ! ***************************************************************************/ ! ! /*************************************************************************** ! * * ! * This program is free software; you can redistribute it and/or modify * ! * it under the terms of the GNU General Public License as published by * ! * the Free Software Foundation; either version 2 of the License, or * ! * (at your option) any later version. * ! * * ! ***************************************************************************/ #include "CompositeView.h" *************** *** 101,103 **** --- 117,121 ---- } return boundingArea; + } + void CompositeView::layout() { } |
From: Darius S. <dst...@us...> - 2001-07-25 13:00:46
|
Update of /cvsroot/kuml/kuml/kuml_gui/src/ige/common/commands In directory usw-pr-cvs1:/tmp/cvs-serv4214 Added Files: NewChainedLineCmd.h NewChainedLineCmd.cpp Log Message: Added file --- NEW FILE --- /*************************************************************************** NewChainedLineCmd.h - description ------------------- begin : Tue July 24 2001 copyright : (C) 2001 by the kUML Team author : Darius Stachow email : sta...@in... ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef NEWCHAINEDLINECMD_H #define NEWCHAINEDLINECMD_H #include "NewViewCmd.h" class Document; class View; class NewChainedLineCmd : public NewViewCmd { public: virtual void undo(); virtual string getDescription() { return "New Chained Line"; } protected: virtual View * createView(Document *doc); public: virtual ~NewChainedLineCmd(); NewChainedLineCmd(); }; #endif //NEWCHAINEDLINECMD_H --- NEW FILE --- /*************************************************************************** NewChainedLineCmd.cpp - description ------------------- begin : Tue July 24 2001 copyright : (C) 2001 by the kUML Team author : Darius Stachow email : sta...@in... ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "NewChainedLineCmd.h" #include "ige/common/views/ViewFactory.h" #include "ige/common/views/View.h" View * NewChainedLineCmd::createView(Document *doc){ // TextModel *tm = new TextModel(); ViewFactory factory(doc); View *v = (View*)factory.createChainedLine(); // ChainedLineView *clv = factory.createChainedLine(); return v; } void NewChainedLineCmd::undo(){ qDebug("NewChainedLineCmd->Undo called (Not yet implemented!)"); } NewChainedLineCmd::~NewChainedLineCmd(){ } NewChainedLineCmd::NewChainedLineCmd(){ } |
From: Darius S. <dst...@us...> - 2001-07-25 12:56:11
|
Update of /cvsroot/kuml/kuml/kuml_gui/src/ige/common/views In directory usw-pr-cvs1:/tmp/cvs-serv3228/common/views Modified Files: AbstractView.cpp AbstractView.h Layoutable.h LineView.cpp SelectableView.cpp SelectableView.h SimpleLineView.cpp SimpleLineView.h View.h ViewDecorator.h ViewFactory.cpp ViewFactory.h Log Message: Added chained line support Index: AbstractView.cpp =================================================================== RCS file: /cvsroot/kuml/kuml/kuml_gui/src/ige/common/views/AbstractView.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** AbstractView.cpp 2001/07/24 11:34:49 1.3 --- AbstractView.cpp 2001/07/25 12:56:08 1.4 *************** *** 44,52 **** AbstractView::~AbstractView(){ } - void AbstractView::update(){ - } - void AbstractView::changed() { - // DefaultLayouter::getInstance()->layoutSubViews(this); - } AbstractView::AbstractView(Viewer* viewer, View * parent){ --- 44,47 ---- *************** *** 69,78 **** } void AbstractView::remove(View * v){ - } - void AbstractView::add(View * v){ } ! bool AbstractView::intersects(const QPoint &p){ ! } ! QRect AbstractView::bounds() { ! return boundingRect; ! } --- 64,68 ---- } void AbstractView::remove(View * v){ } ! void AbstractView::update(){ ! } Index: AbstractView.h =================================================================== RCS file: /cvsroot/kuml/kuml/kuml_gui/src/ige/common/views/AbstractView.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** AbstractView.h 2001/07/24 11:34:49 1.3 --- AbstractView.h 2001/07/25 12:56:08 1.4 *************** *** 23,37 **** #include "ige/common/Paintable.h" #include "PaintAttributes.h" - #include "View.h" #include <qrect.h> - #include <vector.h> class Editor; - class QPopupMenu; class ViewLayouter; ! class AbstractView : public View { public: --- 23,36 ---- #include "ige/common/Paintable.h" #include "PaintAttributes.h" #include <qrect.h> + #include "View.h" + //#include <vector.h> class Editor; class QPopupMenu; class ViewLayouter; ! class AbstractView : public View{ public: *************** *** 40,51 **** virtual ~AbstractView(); - virtual QRect bounds(); - - virtual bool intersects(const QPoint & p); - virtual void remove(View * v); - virtual void add(View * v); - virtual View* getParent(); --- 39,44 ---- *************** *** 64,71 **** virtual void setCenter(const QPoint& p); - virtual void changed(); - - virtual void update(); - /** * This implementation sets the paint attributes and call paintContents() --- 57,60 ---- *************** *** 81,90 **** viewer = v; } - - - private: ! /** @link aggregation */ ! vector < View * > childs; QRect boundingRect; ViewLayouter * lnkLayouter; --- 70,75 ---- viewer = v; } ! private: QRect boundingRect; ViewLayouter * lnkLayouter; *************** *** 120,123 **** --- 105,110 ---- virtual void move(const QPoint& delta); + + virtual void update(); }; #endif //ABSTRACTVIEW_H Index: Layoutable.h =================================================================== RCS file: /cvsroot/kuml/kuml/kuml_gui/src/ige/common/views/Layoutable.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** Layoutable.h 2001/06/20 19:21:29 1.1.1.1 --- Layoutable.h 2001/07/25 12:56:08 1.2 *************** *** 30,34 **** public: ! virtual void layoutChilds() = 0; virtual ViewLayouter * getLayouter() = 0; --- 30,34 ---- public: ! virtual void layout() = 0; virtual ViewLayouter * getLayouter() = 0; Index: LineView.cpp =================================================================== RCS file: /cvsroot/kuml/kuml/kuml_gui/src/ige/common/views/LineView.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** LineView.cpp 2001/07/24 11:34:49 1.3 --- LineView.cpp 2001/07/25 12:56:08 1.4 *************** *** 1,2 **** --- 1,4 ---- + + /*************************************************************************** LineView.cpp - description *************** *** 7,20 **** email : sta...@in... ***************************************************************************/ - - /*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - #include "LineView.h" --- 9,12 ---- Index: SelectableView.cpp =================================================================== RCS file: /cvsroot/kuml/kuml/kuml_gui/src/ige/common/views/SelectableView.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** SelectableView.cpp 2001/07/24 11:34:49 1.3 --- SelectableView.cpp 2001/07/25 12:56:08 1.4 *************** *** 19,27 **** void SelectableView::mouseRMBPress(QMouseEvent * e){ if(isSelected() == false) { select(); - /* Viewer *v = getViewer(); - Editor *ed = v->getEditor(); - - selector = (ViewSelector*) ed->addManipulator(this);*/ } --- 19,24 ---- void SelectableView::mouseRMBPress(QMouseEvent * e){ if(isSelected() == false) { + getViewer()->getEditor()->unselectAll(); select(); } *************** *** 38,55 **** // A left mouse button click on the view selects it if(isSelected() == false) { select(); - /* Viewer *v = getViewer(); - Editor *ed = v->getEditor(); - - selector = (ViewSelector*) ed->addManipulator(this); - */ } - // Hier morgen weitermachen !!!! - /* ViewManipulator *m = createManipulator(); - CHECK_PTR(m); - ed->addManipulator(m); - selector = (ViewSelector*)m;*/ - } QPopupMenu* SelectableView::createPopupMenu() { --- 35,42 ---- // A left mouse button click on the view selects it if(isSelected() == false) { + getViewer()->getEditor()->unselectAll(); select(); } } QPopupMenu* SelectableView::createPopupMenu() { *************** *** 108,112 **** } SelectableView::~SelectableView(){} ! SelectableView::SelectableView(Viewer* viewer, View * parent) : AbstractView(viewer, parent) { manipulator = 0; selected = false; --- 95,99 ---- } SelectableView::~SelectableView(){} ! SelectableView::SelectableView(Viewer * viewer, View * parent) : CompositeView(viewer, parent) { manipulator = 0; selected = false; Index: SelectableView.h =================================================================== RCS file: /cvsroot/kuml/kuml/kuml_gui/src/ige/common/views/SelectableView.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** SelectableView.h 2001/07/24 11:34:49 1.3 --- SelectableView.h 2001/07/25 12:56:08 1.4 *************** *** 19,23 **** #ifndef SELECTABLEVIEW_H #define SELECTABLEVIEW_H ! #include "AbstractView.h" #include "Selectable.h" #include "ige/common/GuiProvider.h" --- 19,23 ---- #ifndef SELECTABLEVIEW_H #define SELECTABLEVIEW_H ! #include "CompositeView.h" #include "Selectable.h" #include "ige/common/GuiProvider.h" *************** *** 27,34 **** class View; ! class SelectableView : public AbstractView, public Selectable , public GuiProvider, public Clonable{ public: ! SelectableView(Viewer* viewer = 0, View * parent = 0); virtual ~SelectableView(); --- 27,34 ---- class View; ! class SelectableView : public CompositeView, public Selectable , public GuiProvider, public Clonable{ public: ! SelectableView(Viewer * viewer, View * parent); virtual ~SelectableView(); Index: SimpleLineView.cpp =================================================================== RCS file: /cvsroot/kuml/kuml/kuml_gui/src/ige/common/views/SimpleLineView.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** SimpleLineView.cpp 2001/07/24 11:29:07 1.1 --- SimpleLineView.cpp 2001/07/25 12:56:08 1.2 *************** *** 24,41 **** #include <qpainter.h> - void SimpleLineView::move(const QPoint& delta){ - setStartPoint(getStartPoint() + delta); - setEndPoint(getEndPoint() + delta); - } - void SimpleLineView::setCenter(const QPoint& p){ - qDebug("SimpleLineView::setCenter() not implemented!"); - // rectangle.moveCenter(p); - } - QPoint SimpleLineView::getCenter(){ - QRect rect(getStartPoint(), getEndPoint()); - rect = rect.normalize(); - - return rect.center(); - } bool SimpleLineView::intersects(const QPoint &mousePos){ double r; --- 24,27 ---- *************** *** 78,81 **** --- 64,82 ---- return boundingRect; } + void SimpleLineView::move(const QPoint& delta){ + setStartPoint(getStartPoint() + delta); + setEndPoint(getEndPoint() + delta); + } + void SimpleLineView::setCenter(const QPoint& p){ + qDebug("SimpleLineView::setCenter() not implemented!"); + // rectangle.moveCenter(p); + } + QPoint SimpleLineView::getCenter(){ + QRect rect(getStartPoint(), getEndPoint()); + rect = rect.normalize(); + + return rect.center(); + } + void SimpleLineView::paintContents(QPainter * painter) { painter->drawLine(getStartPoint(), getEndPoint()); Index: SimpleLineView.h =================================================================== RCS file: /cvsroot/kuml/kuml/kuml_gui/src/ige/common/views/SimpleLineView.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** SimpleLineView.h 2001/07/24 11:29:07 1.1 --- SimpleLineView.h 2001/07/25 12:56:08 1.2 *************** *** 36,45 **** virtual QPoint& getEndPoint(); ! virtual void setEndPoint(const QPoint& endPoint); - virtual QRect bounds(); - - virtual bool intersects(const QPoint & mousePos); - virtual QPoint getCenter(); --- 36,41 ---- virtual QPoint& getEndPoint(); ! virtual void setEndPoint(const QPoint& endPoint); virtual QPoint getCenter(); *************** *** 47,52 **** virtual void move(const QPoint& delta); ! virtual ViewManipulator* createManipulator(); protected: --- 43,52 ---- virtual void move(const QPoint& delta); + + virtual ViewManipulator* createManipulator(); + + virtual QRect bounds(); ! virtual bool intersects(const QPoint & mousePos); protected: Index: View.h =================================================================== RCS file: /cvsroot/kuml/kuml/kuml_gui/src/ige/common/views/View.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** View.h 2001/07/24 11:34:49 1.3 --- View.h 2001/07/25 12:56:08 1.4 *************** *** 49,58 **** * Remove sub view */ ! virtual void remove(View* g) = 0; /** * Add sub view */ ! virtual void add(View* g) = 0; virtual View* getParent() = 0; --- 49,58 ---- * Remove sub view */ ! virtual void removeChild(int i) = 0; /** * Add sub view */ ! virtual void addChild(View * g) = 0; virtual View* getParent() = 0; *************** *** 71,74 **** --- 71,78 ---- */ virtual void move(const QPoint& delta) = 0; + + virtual View* getChild(int at) = 0; + + virtual int getChildCount() = 0; }; #endif //VIEW_H Index: ViewDecorator.h =================================================================== RCS file: /cvsroot/kuml/kuml/kuml_gui/src/ige/common/views/ViewDecorator.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** ViewDecorator.h 2001/06/20 19:21:29 1.1.1.1 --- ViewDecorator.h 2001/07/25 12:56:08 1.2 *************** *** 21,24 **** --- 21,25 ---- #include "AbstractView.h" #include "View.h" + #include "CompositeView.h" /** * ViewDecorator can be used to decorate other graphics with *************** *** 26,30 **** * methods to their contained graphic. Subclasses can * override these methods to extend and filter their behavior.*/ ! class ViewDecorator : public AbstractView { }; #endif //VIEWDECORATOR_H --- 27,31 ---- * methods to their contained graphic. Subclasses can * override these methods to extend and filter their behavior.*/ ! class ViewDecorator : CompositeView { }; #endif //VIEWDECORATOR_H Index: ViewFactory.cpp =================================================================== RCS file: /cvsroot/kuml/kuml/kuml_gui/src/ige/common/views/ViewFactory.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** ViewFactory.cpp 2001/07/24 11:34:49 1.3 --- ViewFactory.cpp 2001/07/25 12:56:08 1.4 *************** *** 20,23 **** --- 20,24 ---- #include "TextView.h" #include "SimpleLineView.h" + #include "ChainedLineView.h" #include "ige/common/documents/Document.h" *************** *** 25,32 **** void ViewFactory::setDocument(Document* document){ this->document = document; ! } Document* ViewFactory::getDocument(){ return document; ! } SimpleLineView* ViewFactory::createSimpleLine(){ SimpleLineView *v = new SimpleLineView(getDocument()->getViewer()); --- 26,38 ---- void ViewFactory::setDocument(Document* document){ this->document = document; ! } Document* ViewFactory::getDocument(){ return document; ! } ! ChainedLineView* ViewFactory::createChainedLine(){ ! ChainedLineView *v = new ChainedLineView(getDocument()->getViewer()); ! getDocument()->addView(v); ! return v; ! } SimpleLineView* ViewFactory::createSimpleLine(){ SimpleLineView *v = new SimpleLineView(getDocument()->getViewer()); Index: ViewFactory.h =================================================================== RCS file: /cvsroot/kuml/kuml/kuml_gui/src/ige/common/views/ViewFactory.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** ViewFactory.h 2001/07/24 11:34:49 1.2 --- ViewFactory.h 2001/07/25 12:56:08 1.3 *************** *** 19,22 **** --- 19,23 ---- #ifndef VIEWFACTORY_H #define VIEWFACTORY_H + class ChainedLineView; class Document; class SimpleLineView; *************** *** 44,47 **** --- 45,50 ---- void setDocument(Document* document); + + ChainedLineView* createChainedLine(); private: |
From: Darius S. <dst...@us...> - 2001-07-25 12:56:11
|
Update of /cvsroot/kuml/kuml/kuml_gui/src/ige/common/manipulators In directory usw-pr-cvs1:/tmp/cvs-serv3228/common/manipulators Modified Files: AbstractViewManipulator.cpp AbstractViewManipulator.h Log Message: Added chained line support Index: AbstractViewManipulator.cpp =================================================================== RCS file: /cvsroot/kuml/kuml/kuml_gui/src/ige/common/manipulators/AbstractViewManipulator.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** AbstractViewManipulator.cpp 2001/07/24 11:34:49 1.3 --- AbstractViewManipulator.cpp 2001/07/25 12:56:08 1.4 *************** *** 22,25 **** --- 22,29 ---- #include "AbstractViewManipulator.h" + int AbstractViewManipulator::getChildCount(){ + } + View* AbstractViewManipulator::getChild(int at){ + } void AbstractViewManipulator::move(const QPoint& delta){ } Index: AbstractViewManipulator.h =================================================================== RCS file: /cvsroot/kuml/kuml/kuml_gui/src/ige/common/manipulators/AbstractViewManipulator.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** AbstractViewManipulator.h 2001/07/24 11:34:49 1.3 --- AbstractViewManipulator.h 2001/07/25 12:56:08 1.4 *************** *** 58,65 **** /** Implementation of interface View */ ! virtual void remove(View * v) {} /** Implementation of interface View */ ! virtual void add(View * v) {} /** Implementation of interface View */ --- 58,65 ---- /** Implementation of interface View */ ! virtual void removeChild(int i) {} /** Implementation of interface View */ ! virtual void addChild(View * v) {} /** Implementation of interface View */ *************** *** 113,116 **** --- 113,120 ---- virtual void move(const QPoint& delta); + + virtual View* getChild(int at); + + virtual int getChildCount(); protected: |
From: Darius S. <dst...@us...> - 2001-07-25 12:56:11
|
Update of /cvsroot/kuml/kuml/kuml_gui/src/ige/common/tools In directory usw-pr-cvs1:/tmp/cvs-serv3228/common/tools Modified Files: SelectionTool.cpp Log Message: Added chained line support Index: SelectionTool.cpp =================================================================== RCS file: /cvsroot/kuml/kuml/kuml_gui/src/ige/common/tools/SelectionTool.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** SelectionTool.cpp 2001/07/24 11:34:49 1.3 --- SelectionTool.cpp 2001/07/25 12:56:08 1.4 *************** *** 54,57 **** --- 54,58 ---- if(view) { + // editor->unselectAll(); // Let the view process the event itself. The SelectableView's default implemention will create a popup menu view->mouseLMBPress(e); *************** *** 109,115 **** view = layer->pick(e->pos()); ! if(view) // Let the view process the event itself. The SelectableView's default implemention will create a popup menu view->mouseRMBPress(e); else { QPopupMenu *menu; --- 110,117 ---- view = layer->pick(e->pos()); ! if(view) { // Let the view process the event itself. The SelectableView's default implemention will create a popup menu view->mouseRMBPress(e); + } else { QPopupMenu *menu; *************** *** 117,120 **** --- 119,123 ---- menu->exec(QCursor::pos()); delete menu; + editor->unselectAll(); } } |