home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # (c) Cadre Technologies Inc. 1996
- #
- # File: @(#)cadcdmcomp.tcl 1.8
- # Author: <generated>
- # Description:
- #---------------------------------------------------------------------------
- # SccsId = @(#)cadcdmcomp.tcl 1.8 07 Mar 1996 Copyright 1996 Cadre Technologies Inc.
-
- # Start user added include file section
- # End user added include file section
-
-
- Class CADCDMComp : {GCObject} {
- constructor
- method destructor
- method getLabel
- method getWorkItem
- method getItem
- method getNameItemType
- method getNameTypeLabel
- method getNameItem
- method getNameWorkItem
- method name
- method getTypeItem
- method getTypeWorkItem
- method type
- attribute nameTypeLabel
- attribute nameItem
- attribute nameWorkItem
- attribute typeItem
- attribute typeWorkItem
- }
-
- constructor CADCDMComp {class this} {
- set this [GCObject::constructor $class $this]
- # Start constructor user section
- $this nameTypeLabel [ORB::nil]
- $this nameItem [ORB::nil]
- $this nameWorkItem [ORB::nil]
- $this typeItem [ORB::nil]
- $this typeWorkItem [ORB::nil]
- # End constructor user section
- return $this
- }
-
- method CADCDMComp::destructor {this} {
- # Start destructor user section
- # End destructor user section
- }
-
- method CADCDMComp::getLabel {this labelType} {
- foreach label [[$this getMatrixComponent] labels] {
- if {[$label type] == $labelType} {
- return $label
- }
- }
- return [ORB::nil]
- }
-
- method CADCDMComp::getWorkItem {this itemType} {
- set item [$this getItem $itemType]
- if {[$item isNil]} {
- return [ORB::nil]
- }
- set configV [[ClientContext::global] currentConfig]
- return [[[$this getMatrixComponent] diagram] \
- findDeclaration $item $configV]
- }
-
- method CADCDMComp::getItem {this itemType} {
- return [[$this getMatrixComponent] getItem $itemType]
- }
-
- method CADCDMComp::getNameItemType {this} {
- return $IT_DATA
- }
-
- method CADCDMComp::getNameTypeLabel {this} {
- if {![[$this nameTypeLabel] isNil]} {
- return [$this nameTypeLabel]
- }
- $this nameTypeLabel [$this getLabel $LT_NAME_TYPE]
- return [$this nameTypeLabel]
- }
-
- method CADCDMComp::getNameItem {this} {
- if {![[$this nameItem] isNil]} {
- return [$this nameItem]
- }
- $this nameItem [$this getItem [$this getNameItemType]]
- return [$this nameItem]
- }
-
- method CADCDMComp::getNameWorkItem {this} {
- if {![[$this nameWorkItem] isNil]} {
- return [$this nameWorkItem]
- }
- $this nameWorkItem [$this getWorkItem [$this getNameItemType]]
- return [$this nameWorkItem]
- }
-
- method CADCDMComp::name {this} {
- set item [$this getNameItem]
- if {[$item isNil]} {
- return ""
- }
- return [$item name]
- }
-
- method CADCDMComp::getTypeItem {this} {
- if {![[$this typeItem] isNil]} {
- return [$this typeItem]
- }
- $this typeItem [$this getItem $IT_CLASS]
- return [$this typeItem]
- }
-
- method CADCDMComp::getTypeWorkItem {this} {
- if {![[$this typeWorkItem] isNil]} {
- return [$this typeWorkItem]
- }
- $this typeWorkItem [$this getWorkItem $IT_CLASS]
- return [$this typeWorkItem]
- }
-
- method CADCDMComp::type {this} {
- set item [$this getTypeItem]
- if {[$item isNil]} {
- return ""
- }
- return [$item name]
- }
-
- # Do not delete this line -- regeneration end marker
-
-