home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # (c) Cadre Technologies Inc. 1996
- #
- # File: @(#)openloceda.tcl /main/hindenburg/1
- # Author: <generated>
- # Description:
- #---------------------------------------------------------------------------
- # SccsId = @(#)openloceda.tcl /main/hindenburg/1 29 Aug 1996 Copyright 1996 Cadre Technologies Inc.
-
- # Start user added include file section
- require "openlocobj.tcl"
- # End user added include file section
-
- require "custdefsar.tcl"
-
- Class OpenLocEdArea : {CustDefsArea} {
- constructor
- method destructor
- method read
- method newObject
- method createObject
- method clearArea
- method getStrategyType
- method setStrategyType
- method removeStrategyType
- attribute usageDefiner
- attribute strategyType
- }
-
- constructor OpenLocEdArea {class this name} {
- set this [CustDefsArea::constructor $class $this $name]
- $this strategyType [Dictionary new]
- # Start constructor user section
- $this rowCount 12
- $this columnCount 80
- $this font "[m4_var get M4_font -context uce]"
- $this destinationSet "OPENSTGLOC dropEvent"
- $this mode DETAIL
- BrowsHeader new $this.name -label Strategy -width 25
- BrowsHeader new $this.type -label Type -width 20
- BrowsHeader new $this.level -label Level -width 15
- BrowsHeader new $this.item -label Item -width 5
- BrowsHeader new $this.phase -label Phase -width 15
- BrowsHeader new $this.file -label File -width 5
- BrowsHeader new $this.comp -label Component -width 15
- BrowsHeader new $this.label -label Label -width 10
- BrowsHeader new $this.cond -label Condition -width 10
- # End constructor user section
- return $this
- }
-
- method OpenLocEdArea::destructor {this} {
- # Start destructor user section
- # End destructor user section
- $this CustDefsArea::destructor
- }
-
- method OpenLocEdArea::read {this object type} {
- set locFileName [$this _curName]
- set locFileType [$this _curType]
- set nameLast [expr [string last locs $locFileName] - 1]
- set typeLast [expr [string last locs $locFileType] - 1]
- set defFileName [string range $locFileName 0 $nameLast]defs
- set defFileType [string range $locFileType 0 $typeLast]defs
-
- foreach defLine [$this readConfig $object $defFileName $defFileType] {
- $this setStrategyType [lindex $defLine 0] [lindex $defLine 1]
- }
-
- foreach locLine [$this readConfig $object $locFileName $locFileType] {
- set strategyType [$this getStrategyType [lindex $locLine 0]]
- $this createObject "name \"[lindex $locLine 0]\"
- type \"$strategyType\"
- itemType \"[lindex $locLine 1]\"
- phase \"[lindex $locLine 2]\"
- fileType \"[lindex $locLine 3]\"
- componentType \"[lindex $locLine 4]\"
- labelType \"[lindex $locLine 5]\"
- condition \"[lindex $locLine 6]\"" \
- $type
- }
- }
-
- method OpenLocEdArea::newObject {this name {edit 0}} {
- $this isChanged 1
-
- set obj [$this createObject "name \"$name\"
- type \"[$this getStrategyType $name]\"
- specLevel \"[$this _level]\"" \
- [$this _level]]
-
- $this sortArea
-
- if $edit {
- $obj open
- }
- }
-
- method OpenLocEdArea::createObject {this objSpec level} {
- global classCount
- set newIndex [llength [$this objectSet]]
- set object [OpenLocObject new $this.Object$classCount $objSpec]
- $object index $newIndex
- incr classCount
-
- $this adjustCreatedObject $object $level
-
- # update the object-details in the view
- $object updateView
-
- return $object
- }
-
- method OpenLocEdArea::clearArea {this} {
- $this CustDefsArea::clearArea
- foreach strategyName [[$this strategyType] names] {
- $this removeStrategyType $strategyName
- }
- }
-
- # Do not delete this line -- regeneration end marker
-
- method OpenLocEdArea::getStrategyType {this strategyName} {
- return [[$this strategyType] set $strategyName]
- }
-
- method OpenLocEdArea::setStrategyType {this strategyName newStrategyType} {
- [$this strategyType] set $strategyName $newStrategyType
- }
-
- method OpenLocEdArea::removeStrategyType {this strategyName} {
- [$this strategyType] unset $strategyName
- }
-
-