home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
cbmethod.tcl
< prev
next >
Wrap
Text File
|
1997-08-29
|
4KB
|
173 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1997
#
# File: @(#)cbmethod.tcl /main/titanic/1
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)cbmethod.tcl /main/titanic/1 29 Aug 1997 Copyright 1997 Cayenne Software Inc.
# Start user added include file section
require "cbpropname.tcl"
require "cbparamete.tcl"
require "cbpropcomp.tcl"
require "cbproplabe.tcl"
require "cbpropitem.tcl"
# End user added include file section
require "cadmethod.tcl"
require "cbcdmcomp.tcl"
require "cbtlentry.tcl"
Class CBMethod : {CBCDMComp CADMethod CBTLEntry} {
method destructor
constructor
method createParameter
method getCBClass
method collectClasses
method collectWorkItems
method collectPropComps
method getVisibility
method format
method getFilter
}
method CBMethod::destructor {this} {
# Start destructor user section
# End destructor user section
$this CBCDMComp::destructor
$this CADMethod::destructor
$this CBTLEntry::destructor
}
constructor CBMethod {class this theClass row} {
set this [CADMethod::constructor $class $this $theClass $row]
set this [CBTLEntry::constructor $class $this $this]
set this [CBCDMComp::constructor $class $this $this]
return $this
}
method CBMethod::createParameter {this cell} {
return [CBParameter new $cell $this]
}
method CBMethod::getCBClass {this} {
return [$this theClass]
}
method CBMethod::collectClasses {this classList} {
if {[[$this getClassBrowser] isInFlatViewMode]} {
$classList append [$this theClass]
}
$this CBCDMComp::collectClasses $classList
[$this parameterSet] foreach param {
$param collectClasses $classList
}
}
method CBMethod::collectWorkItems {this workItemList} {
if {[[$this getClassBrowser] isInFlatViewMode]} {
[$this theClass] collectWorkItems $workItemList
}
$this CBCDMComp::collectWorkItems $workItemList
[$this parameterSet] foreach param {
$param collectWorkItems $workItemList
}
}
method CBMethod::collectPropComps {this propCompList} {
if {[[$this getClassBrowser] isInFlatViewMode]} {
[$this theClass] collectPropComps $propCompList
}
$this CBCDMComp::collectPropComps $propCompList
[$this parameterSet] foreach param {
$param collectPropComps $propCompList
}
}
method CBMethod::getVisibility {this} {
if ![[$this getClassBrowser] showVisibility] {
return ""
}
set access [[$this row] getPropertyValue $COMP_METHOD_ACCESS]
if {$access == "" || $access == "Public"} {
# 'Public' is assumed to be the default ...
return "+"
}
if {$access == "Protected"} {
return "#"
}
if {$access == "Private"} {
return "-"
}
return ""
}
method CBMethod::format {this} {
set prefix ""
if {[[$this getClassBrowser] isInFlatViewMode]} {
set prefix "[[$this theClass] name]: "
}
if {[$this formattedText] != ""} {
return $prefix[$this formattedText]
}
set result [$this getVisibility]
set isClassFeature [[$this row] getPropertyValue $COMP_CLASS_ATTR]
if {$isClassFeature == "1"} {
set result "${result}\$"
}
set result "${result}[$this name]"
set nrOfParams [[$this parameterSet] length]
if {$nrOfParams == 0} {
if {!([$this name] == "create" && \
$isClassFeature == "1" && [[$this row] \
getPropertyValue $COMP_HAS_PARAMLIST] != "1")} {
set result "${result}()"
}
} else {
set result "${result}("
set firstParam 1
[$this parameterSet] foreach param {
if {$firstParam} {
set firstParam 0
} else {
set result "${result}, "
}
set result "${result}[$param format]"
}
set result "${result})"
}
if {[$this type] != ""} {
set result "${result}: [$this type]"
}
set isAbstract [[$this row] getPropertyValue $COMP_ABSTRACT]
if {$isAbstract == "1"} {
set result "${result} {abstract}"
}
$this formattedText $result
return $prefix$result
}
method CBMethod::getFilter {this} {
return ${ClassBrowser::operFilter}
}
# Do not delete this line -- regeneration end marker