home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
selmodfilt.tcl
< prev
next >
Wrap
Text File
|
1997-10-03
|
3KB
|
98 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1997
#
# File: @(#)selmodfilt.tcl /main/titanic/3
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)selmodfilt.tcl /main/titanic/3 3 Oct 1997 Copyright 1997 Cayenne Software Inc.
# Start user added include file section
require "moduledb.tcl"
# End user added include file section
# This filter is used for filtering the entries in a SelectModuleDialog:
# - name: only pass modules with name $name ("" means no filtering);
# - type: only pass modules of type $type ("" means no filtering);
# - isSupportingModule: if true do not pass modules that are supporting
# (false means no filtering);
#
Class SelModFilter : {GCObject} {
constructor
method destructor
method passes
method equals
method clone
attribute name
attribute type
attribute isSupportingModule
}
constructor SelModFilter {class this} {
set this [GCObject::constructor $class $this]
$this name ""
$this type ""
$this isSupportingModule 0
# Start constructor user section
# End constructor user section
return $this
}
method SelModFilter::destructor {this} {
# Start destructor user section
# End destructor user section
}
method SelModFilter::passes {this modulePath} {
set moduleDB [ModuleDB::global]
if ![$moduleDB isValidModule $modulePath] {
return 0
}
set propDict [$moduleDB getModulePropDict $modulePath]
set name [$propDict set "name"]
if {[$this name] != "" && [$this name] != $name} {
return 0
}
set type [$propDict set "type"]
if {[$this type] != "" && [$this type] != $type} {
return 0
}
set isSupp [$propDict set "isSupportingModule"]
if {[$this isSupportingModule] && $isSupp == "yes"} {
return 0
}
return 1
}
method SelModFilter::equals {this otherFilter} {
set thisFilterStr "[$this name][$this type][\
$this isSupportingModule]"
set otherFilterStr "[$otherFilter name][$otherFilter type][\
$otherFilter isSupportingModule]"
if {$thisFilterStr == $otherFilterStr} {
return 1
}
return 0
}
method SelModFilter::clone {this} {
set filter [SelModFilter new]
$filter name [$this name]
$filter type [$this type]
$filter isSupportingModule [$this isSupportingModule]
return $filter
}
# Do not delete this line -- regeneration end marker