cupertino-files / FilterSet
Class: FilterSet
Defined in: src/tst/filters.ts:81
Constructors
Constructor
new FilterSet(
store,object):FilterSet
Defined in: src/tst/filters.ts:85
Parameters
store
object
Returns
FilterSet
Properties
object
readonlyobject:IwaObject
Defined in: src/tst/filters.ts:83
store
readonlystore:ObjectStore
Defined in: src/tst/filters.ts:82
Accessors
consistent
Get Signature
get consistent():
boolean
Defined in: src/tst/filters.ts:175
True when the parallel arrays line up with the rule list.
filter_offsets and filter_enabled are indexed by rule position, so a set where they are shorter than the rules is one whose later rules have no column — worth detecting rather than silently reading as column 0. An empty set with a single stray offset, which is what every fixture holds, counts as consistent.
Returns
boolean
enabled
Get Signature
get enabled():
boolean
Defined in: src/tst/filters.ts:95
Whether the app is applying this set at all.
Returns
boolean
id
Get Signature
get id():
bigint
Defined in: src/tst/filters.ts:90
Returns
bigint
mode
Get Signature
get mode():
FilterMode
Defined in: src/tst/filters.ts:117
Returns
Methods
describe()
describe():
string[]
Defined in: src/tst/filters.ts:202
Readable summary, one line per rule.
Returns
string[]
rules()
rules(
options?):FilterRule[]
Defined in: src/tst/filters.ts:145
The rules, in stored order.
The modern list wins where both exist, matching how the apps read them; a file written before the 2016 format change carries only the older one.
Parameters
options?
ReadPredicateOptions = {}
Returns
setEnabled()
setEnabled(
enabled):void
Defined in: src/tst/filters.ts:113
Turn the set on or off — the flag alone, never the stored states.
The extent's RowOrColumnState list is the filter machinery's working substrate, not a result cache: the app keeps it across enable/disable (a disabled filter with its states opens unfiltered and re-enables correctly), and a panel toggle never rebuilds a missing list — a filter enabled over no states stores the flag and hides nothing. Corpus tables with zero states are filters that never ran, not filters the app cleaned. So disabling leaves the states exactly where they were.
Parameters
enabled
boolean
Returns
void
setMode()
setMode(
mode):void
Defined in: src/tst/filters.ts:121
Parameters
mode
Returns
void
setRuleEnabled()
setRuleEnabled(
index,enabled):void
Defined in: src/tst/filters.ts:183
Turn a rule on or off without removing it.
Parameters
index
number
enabled
boolean
Returns
void