home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # (c) Cadre Technologies Inc. 1996
- #
- # File: @(#)cbpropfilt.tcl 1.6
- # Author: <generated>
- # Description:
- #---------------------------------------------------------------------------
- # SccsId = @(#)cbpropfilt.tcl 1.6 20 Mar 1996 Copyright 1996 Cadre Technologies Inc.
-
- # Start user added include file section
- require cbpropdefi.tcl
- # End user added include file section
-
- require "cbfilterel.tcl"
-
- Class CBPropFilterElement : {CBFilterElement} {
- constructor
- method destructor
- method letsPass
- method addPropHolder
- method removePropHolder
- attribute propHolderSet
- }
-
- constructor CBPropFilterElement {class this name propDefinition} {
- set this [CBFilterElement::constructor $class $this $name $propDefinition]
- $this propHolderSet [List new]
- # Start constructor user section
- # End constructor user section
- return $this
- }
-
- method CBPropFilterElement::destructor {this} {
- # Start destructor user section
- # End destructor user section
- $this CBFilterElement::destructor
- }
-
- method CBPropFilterElement::letsPass {this feature} {
- if {![$this enabled]} {
- return 1
- }
-
- set propName [[$this propDefinition] name]
- [$this propHolderSet] foreach prpHldr {
- set propObject [eval $prpHldr]
- set value ""
- if {$propObject != "" && ![$propObject isNil]} {
- set propVal [$propObject findProperty $propName]
- if {[$propVal isNil]} {
- set value [[$this propDefinition] defaultValue]
- } else {
- set value [$propVal value]
- }
- }
- if {![$this match $value]} {
- return 0
- }
- }
- return 1
- }
-
- # Do not delete this line -- regeneration end marker
-
- method CBPropFilterElement::addPropHolder {this newPropHolder} {
- [$this propHolderSet] append $newPropHolder
-
- }
-
- method CBPropFilterElement::removePropHolder {this oldPropHolder} {
- [$this propHolderSet] removeValue $oldPropHolder
- }
-
-