| 434 | } |
| 435 | |
| 436 | PathMatcher PathMatcher::intersection( const PathMatcher &paths ) const |
| 437 | { |
| 438 | PathMatcher result = PathMatcher(); |
| 439 | for( Iterator it = (*this).begin(); it != (*this).end(); ++it ) |
| 440 | { |
| 441 | RawIterator rit = paths.find( *it ); |
| 442 | if( rit == paths.end() ) |
| 443 | { |
| 444 | it.prune(); |
| 445 | } |
| 446 | else if( rit.exactMatch() ) |
| 447 | { |
| 448 | result.addPath( *it ); |
| 449 | } |
| 450 | } |
| 451 | return result; |
| 452 | } |
| 453 | |
| 454 | bool PathMatcher::prune( const std::string &path ) |
| 455 | { |