home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
msumlparam.tcl
< prev
next >
Wrap
Text File
|
1997-08-29
|
3KB
|
113 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1997
#
# File: @(#)msumlparam.tcl /main/titanic/2
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)msumlparam.tcl /main/titanic/2 29 Aug 1997 Copyright 1997 Cayenne Software Inc.
# Start user added include file section
# End user added include file section
#require "msumltypee.tcl"
Class MSUMLParameter : {MSUMLTypeExpression} {
method destructor
constructor
method ot2ms
method ms2ot
method promoter
method owner
attribute _owner
attribute cell
}
method MSUMLParameter::destructor {this} {
set ref [$this _owner]
if {$ref != ""} {
[$ref _parameterSet] removeValue $this
}
# Start destructor user section
# End destructor user section
$this MSUMLTypeExpression::destructor
}
constructor MSUMLParameter {class this typeName cell item owner {typeItem ""}} {
set this [MSUMLTypeExpression::constructor $class $this $typeName $typeItem]
$this _owner $owner
#[$owner _parameterSet] append $this
$this workItem $item
$this cell $cell
return $this
}
method MSUMLParameter::ot2ms {this msOper {kind ""}} {
set workItem [$this workItem]
set name [$workItem name]
puts "\t\t\tParameter $name"
global trans
$trans begin
set myParam [$msOper createParameter $name]
set iParam [$myParam getInterface IUmlParameter]
set typeItem [$this typeItem]
if [llength $typeItem] {
$iParam property TypeExpression [$typeItem name]
}
if [llength $kind] {
$iParam property Kind $kind
}
if {$kind == "return"} {
$trans commit
return $myParam
}
set cell [$this cell]
set defValue [$cell getPropertyValue default_value]
if [llength $defValue] {
$iParam property DefaultValue $defValue
}
#$this saveFreeTextProp $myParam [$workItem properties]
$trans commit
return $myParam
}
method MSUMLParameter::ms2ot {this myOper} {
set paramName [$this name]
set iParam [$this getInterface IUmlParameter]
set typeName [$iParam property TypeExpression]
set defValue [$iParam property DefaultValue]
if [llength $typeName] {
set paramName "${paramName}:$typeName"
}
set param [$myOper addParam $paramName]
if [llength $defValue] {
$param setProp default_value $defValue
}
$this loadFreeTextProp $param
return $param
}
method MSUMLParameter::promoter {this} {
$this MSUMLTypeExpression::promoter
}
# Do not delete this line -- regeneration end marker
method MSUMLParameter::owner {this args} {
if {$args == ""} {
return [$this _owner]
}
set ref [$this _owner]
if {$ref != ""} {
[$ref _parameterSet] removeValue $this
}
set obj [lindex $args 0]
if {$obj != ""} {
[$obj _parameterSet] append $this
}
$this _owner $obj
}