home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1997 November
/
PCWorld_1997-11_cd.bin
/
software
/
programy
/
komix
/
DATA.Z
/
cadnassocc.tcl
< prev
next >
Wrap
Text File
|
1996-06-11
|
2KB
|
88 lines
#---------------------------------------------------------------------------
#
# (c) Cadre Technologies Inc. 1996
#
# File: @(#)cadnassocc.tcl /main/2
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)cadnassocc.tcl /main/2 11 Jun 1996 Copyright 1996 Cadre Technologies 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 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::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