home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # (c) Cayenne Software Inc. 1997
- #
- # File: @(#)msumlattri.tcl /main/hindenburg/10
- # Author: <generated>
- # Description:
- #---------------------------------------------------------------------------
- # SccsId = @(#)msumlattri.tcl /main/hindenburg/10 3 Jun 1997 Copyright 1997 Cayenne Software Inc.
-
- # Start user added include file section
- # End user added include file section
-
- #require "msumlmembe.tcl"
-
- Class MSUMLAttribute : {MSUMLMember} {
- constructor
- method destructor
- method ot2ms
- method ms2ot
- method promoter
- }
-
- constructor MSUMLAttribute {class this typeName workItem {typeItem ""}} {
- set this [MSUMLMember::constructor $class $this $typeName $workItem $typeItem]
- # Start constructor user section
- # End constructor user section
- return $this
- }
-
- method MSUMLAttribute::destructor {this} {
- # Start destructor user section
- # End destructor user section
- $this MSUMLMember::destructor
- }
-
- method MSUMLAttribute::ot2ms {this msClass} {
- set workItem [$this workItem]
- set name [$workItem name]
- puts "\t\tAttribute '$name'"
- global trans
- $trans begin
- set myAttr [$msClass createAttribute $name]
- set ip [$workItem properties]
- set initialValue [$ip getPropertyValue initial_value]
- if [llength $initialValue] {
- $myAttr property InitialValue $initialValue
- }
- $this saveFreeTextProp $myAttr $ip
- $trans commit
- return $myAttr
- }
-
- method MSUMLAttribute::ms2ot {this myClass} {
- set attrName [$this name]
- set iAttr [$this interfaceOfMe IUmlAttribute]
- set attrType [$iAttr property TypeExpression]
- if [llength $attrType] {
- set attrName "${attrName}:${attrType}"
- }
- set isTypeScope [$iAttr property IsTypeScope]
- if {[llength $isTypeScope] && $isTypeScope == "1"} {
- set attrName "\$$attrName"
- }
- set myAttr [$myClass addAttrib $attrName]
- $myAttr setProp initial_value [$iAttr property InitialValue] comp
- $this loadFreeTextProp $myAttr
- return $myAttr
- }
-
- method MSUMLAttribute::promoter {this} {
- $this MSUMLMember::promoter
- }
-
- # Do not delete this line -- regeneration end marker
-
-