void MConfig::addRules( WFileName& srcMask, WFileName& tgtMask, WVList& list, WString& tagMask ) { int icount = _rules.count(); for( int i=0; i<icount; i++ ) { MRule* rule = (MRule*)_rules[i]; if( rule->match( tagMask, srcMask, tgtMask ) ) { list.add( rule ); } } }
MRule* MConfig::findMatchingRule( WFileName& fn, WString& mask ) { int icount = _rules.count(); for( int i=0; i<icount; i++ ) { MRule* rule = (MRule*)_rules[i]; if( rule->match( mask, fn ) ) { return( rule ); } } return( nilRule() ); }
int MConfig::findMatchingRules( WFileName& fn, WString& mask, WVList& list ) { int icount = _rules.count(); for( int i=0; i<icount; i++ ) { MRule* rule = (MRule*)_rules[i]; if( rule->match( mask, fn ) ) { list.add( rule ); } } return( list.count() ); }