home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
cadnassocc.tcl
< prev
next >
Wrap
Text File
|
1997-09-03
|
3KB
|
102 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1997
#
# File: @(#)cadnassocc.tcl /main/titanic/1
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)cadnassocc.tcl /main/titanic/1 3 Sep 1997 Copyright 1997 Cayenne Software Inc.
# Start user added include file section
# End user added include file section
require "cadassocia.tcl"
Class CADNAssocConn : {CADAssociation} {
constructor
method destructor
method load
method getRoleLabel
method getRoleItem
method getRoleWorkItem
method role
method getConstraintLabel
method constraint
method getPartnerNAssocConns
attribute class
attribute nAssocNode
}
constructor CADNAssocConn {class this inModel} {
set this [CADAssociation::constructor $class $this $inModel]
# Start constructor user section
# End constructor user section
return $this
}
method CADNAssocConn::destructor {this} {
# Start destructor user section
# End destructor user section
$this CADAssociation::destructor
}
method CADNAssocConn::load {this} {
if {[$this loaded] == 1} {
return
}
$this loaded 1
set fromNode [$this getFrom $OMT_CAD_CB_Class]
if {$fromNode == ""} {
$this nAssocNode [$this getFrom $OMT_CAD_NAssoc]
$this class [$this getTo $OMT_CAD_CB_Class]
} else {
$this nAssocNode [$this getTo $OMT_CAD_NAssoc]
$this class $fromNode
}
[$this nAssocNode] load
}
method CADNAssocConn::getRoleLabel {this} {
return [$this getLabel 0 $LT_ROLE]
}
method CADNAssocConn::getRoleItem {this} {
return [$this getItem 0 $LT_ROLE $IT_DATA]
}
method CADNAssocConn::getRoleWorkItem {this} {
return [$this getWorkItem 0 $LT_ROLE $IT_DATA]
}
method CADNAssocConn::role {this} {
set roleItem [$this getRoleItem]
if {[$roleItem isNil]} {
return ""
}
return [$roleItem name]
}
method CADNAssocConn::getConstraintLabel {this} {
return [$this getLabel 0 $LT_CONSTRAINT]
}
method CADNAssocConn::constraint {this} {
set label [$this getConstraintLabel]
if [$label isNil] {
return ""
}
return [$label value]
}
method CADNAssocConn::getPartnerNAssocConns {this} {
set nAssocConns [[[$this nAssocNode] nAssocConnSet] contents]
set idx [lsearch -exact $nAssocConns $this]
set nAssocConns [lreplace $nAssocConns $idx $idx]
return $nAssocConns
}
# Do not delete this line -- regeneration end marker