home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # (c) Cadre Technologies Inc. 1996
- #
- # File: @(#)cachedrowc.tcl 1.3
- # Author: <generated>
- # Description:
- #---------------------------------------------------------------------------
- # SccsId = @(#)cachedrowc.tcl 1.3 12 Mar 1996 Copyright 1996 Cadre Technologies Inc.
-
- # Start user added include file section
- # End user added include file section
-
-
- Class CachedRowCell : {Object} {
- constructor
- method destructor
- method promoter
- method getPropertyValue
- method getItem
- method addItem
- method removeItem
- method getPropValue
- method setPropValue
- method removePropValue
- attribute itemSet
- attribute propValue
- }
-
- constructor CachedRowCell {class this name} {
- set this [Object::constructor $class $this $name]
- $this itemSet [List new]
- $this propValue [Dictionary new]
- # Start constructor user section
- # End constructor user section
- return $this
- }
-
- method CachedRowCell::destructor {this} {
- # Start destructor user section
- # End destructor user section
- }
-
- method CachedRowCell::promoter {this items props} {
- $this propValue [Dictionary new]
- $this itemSet [List new]
-
- set nmValList ""
- foreach prop $props {
- lappend nmValList [$prop name]
- lappend nmValList [$prop value]
- }
- [$this propValue] contents $nmValList
- [$this itemSet] contents $items
- }
-
- method CachedRowCell::getPropertyValue {this name} {
- return [$this getPropValue $name]
- }
-
- method CachedRowCell::getItem {this itemType} {
- [$this itemSet] foreach item {
- if {[$item type] == $itemType} {
- return $item
- }
- }
- return [ORB::nil]
- }
-
- # Do not delete this line -- regeneration end marker
-
- method CachedRowCell::addItem {this newItem} {
- [$this itemSet] append $newItem
-
- }
-
- method CachedRowCell::removeItem {this oldItem} {
- [$this itemSet] removeValue $oldItem
- }
-
- method CachedRowCell::getPropValue {this propName} {
- return [[$this propValue] set $propName]
- }
-
- method CachedRowCell::setPropValue {this propName newPropValue} {
- [$this propValue] set $propName $newPropValue
- }
-
- method CachedRowCell::removePropValue {this propName} {
- [$this propValue] unset $propName
- }
-
-