In the
configuration file CADENAS_SETUP/geomsearch.cfg you
can define multiple filter rules. If at least one of the rules applies, the
part is filtered out.
In the block
[settings], in the keyGenerationFilterRules, determine a comma-separated list of all the rules.[settings] GenerationFilterRules=Rule1,Rule2,etc.
For each rule, define a block according to the scheme
GenerationFilterRule_Rulex.[GenerationFilterRule_Rule1] Catalogs=cat/__partialtest AlgoTypes=PARTIAL,TOPO PrjRegExp=.*ass.* PrjScriptCallbackFile= PrjScriptCallbackFunction= LineFilterCount=1 LineFilterVar0=TYPE LineFilterRegExp0=.*ass.* Conjunction=AND LineScriptCallbackFile=test.vbb LineScriptCallbackFunction=checkLine
Explanations to the individual keys:
AlgoTypes: Index types that should NOT be generated (comma separated)
Concerns project and line conditions. If there is not more than 1 project condition and not more than 1 line condition, it doesn't matter if OR or AND.
If OR, then a project or line filter is applied if one the rules matches. If AND, all non-empty rules must match.
PrjRegExp: Statement of a regular expression. This is tested for the project path relatively to the catalog. If it matches it will be filtered.
Example: All projects that have "asm" anywhere in the path will be filtered by following regular expression:
.*asm.*
PrjScriptCallbackFile: Path to vbb script containing the callback
PrjScriptCallbackFunction: The function
PrjScriptCallbackFunctiongets the prj path as a parameter and is expected to return "true" if the filter shall be applied, otherwise 0.
LineFilterCount: Number of line conditions
Example with 3 line conditions:
LineFilterCount=3 LineFilterVar0=A LineFilterRegExp0=.*ab.* LineFilterVar1=B LineFilterRegExp1=.*ac.* LineFilterVar2=C LineFilterRegExp2=.*ad.*
LineFilterVar0: Variable name from table (replace 0 by the index of the condition)
LineFilterRegExp0= The value of the attribute of the stated variable must match the regular expression to be filtered. (Replace 0 by the index of the condition.)
LineScriptCallbackFile: Path to vbb script containing the callback
LineScriptCallbackFunction: The function
LineScriptCallbackFunctiongets the table as a parameter and is expected to return "true" if the filter shall be applied, otherwise 0.Following example filters all lines with line-id greater than 50000:
function filterLines(table) dim row = table.SelectedRow dim lineId = row.Idnr if lineId > 50000 then filterLines = 1 else filterLines = 0 end if end function
