home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # (c) Cayenne Software Inc. 1997
- #
- # File: @(#)cbattribut.tcl /main/titanic/1
- # Author: <generated>
- # Description:
- #---------------------------------------------------------------------------
- # SccsId = @(#)cbattribut.tcl /main/titanic/1 29 Aug 1997 Copyright 1997 Cayenne Software Inc.
-
- # Start user added include file section
- require "cbpropname.tcl"
-
- require "cbpropcomp.tcl"
- require "cbproplabe.tcl"
- require "cbpropitem.tcl"
- # End user added include file section
-
- require "cadfeature.tcl"
- require "cbcdmcomp.tcl"
- require "cbtlentry.tcl"
-
- Class CBAttribute : {CBCDMComp CADFeature CBTLEntry} {
- method destructor
- constructor
- method getCBClass
- method collectClasses
- method collectWorkItems
- method collectPropComps
- method format
- method getFilter
- }
-
- method CBAttribute::destructor {this} {
- # Start destructor user section
- # End destructor user section
- $this CBCDMComp::destructor
- $this CADFeature::destructor
- $this CBTLEntry::destructor
- }
-
- constructor CBAttribute {class this theClass row} {
- set this [CADFeature::constructor $class $this $theClass $row]
- set this [CBTLEntry::constructor $class $this $this]
- set this [CBCDMComp::constructor $class $this $this]
- return $this
- }
-
- method CBAttribute::getCBClass {this} {
- return [$this theClass]
- }
-
- method CBAttribute::collectClasses {this classList} {
- if {[[$this getClassBrowser] isInFlatViewMode]} {
- $classList append [$this theClass]
- }
- $this CBCDMComp::collectClasses $classList
- }
-
- method CBAttribute::collectWorkItems {this workItemList} {
- if {[[$this getClassBrowser] isInFlatViewMode]} {
- [$this theClass] collectWorkItems $workItemList
- }
- $this CBCDMComp::collectWorkItems $workItemList
- }
-
- method CBAttribute::collectPropComps {this propCompList} {
- if {[[$this getClassBrowser] isInFlatViewMode]} {
- [$this theClass] collectPropComps $propCompList
- }
- $this CBCDMComp::collectPropComps $propCompList
- }
-
- method CBAttribute::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 isDerived [[$this row] getPropertyValue $COMP_DERIVED_ATTR]
- if {$isDerived == "1"} {
- set result "${result}/"
- }
-
- set isKey [[$this row] getPropertyValue $COMP_KEY]
- if {$isKey == "1"} {
- set result "${result}*"
- }
-
- set result "${result}[$this name]"
- if {[$this type] != ""} {
- set result "${result}: [$this type]"
- }
-
- set initialValue [[$this row] getPropertyValue $COMP_INITIAL_VALUE]
- if {$initialValue != ""} {
- set result "${result} = $initialValue"
- }
-
- $this formattedText $result
- return $prefix$result
- }
-
- method CBAttribute::getFilter {this} {
- return ${ClassBrowser::attrFilter}
- }
-
- # Do not delete this line -- regeneration end marker
-
-