home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # (c) Cadre Technologies Inc. 1996
- #
- # File: @(#)cbmethod.tcl /main/2
- # Author: <generated>
- # Description:
- #---------------------------------------------------------------------------
- # SccsId = @(#)cbmethod.tcl /main/2 11 Jun 1996 Copyright 1996 Cadre Technologies 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 collectClasses
- method collectWorkItems
- method collectPropComps
- 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::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::format {this} {
- set prefix ""
- if {[[$this getClassBrowser] isInFlatViewMode]} {
- set prefix "[[$this theClass] name]: "
- }
- if {[$this formattedText] != ""} {
- return $prefix[$this formattedText]
- }
-
- set result ""
-
- 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
-
-