Changes between Version 13 and Version 14 of code/doc/ClassTreeMask
- Timestamp:
- Apr 12, 2017, 10:37:32 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
code/doc/ClassTreeMask
v13 v14 1 1 = !ClassTreeMask = 2 [[TracNav(TracNav/TOC_Development)]]3 2 [[TOC]] 4 3 … … 9 8 == Creating the mask == 10 9 === Include and exclude === 11 You can include and exclude classes in the mask by calling the corresponding functions. Including/Excluding a class usually applies not only to the specified class but to all subclasses too.10 You can include and exclude classes in the mask by calling the corresponding functions. !Including/Excluding a class usually applies not only to the specified class but to all subclasses too. 12 11 13 12 '''Notation: Including or excluding a class is denoted as "adding a new rule".''' … … 43 42 === Operators === 44 43 45 It's possible to calculate with masks in the meaning of set-theory, so you can create unions (+), intersections (*), differences (-) and complements(!) by using the corresponding operators.44 It's possible to calculate with masks in the meaning of set-theory, so you can create unions (+), intersections !(*), differences (-) and complements !(!) by using the corresponding operators. 46 45 47 46 * '''Union''': Every class that is included in at least one of the two masks will be included in the resulting mask, all others are excluded ('''or'''). … … 65 64 }}} 66 65 67 '''Note''': The ClassTreeMaskObjectIterator handles all objects as BaseObjects. If you want to use another class, you should use a dynamic_cast:66 '''Note''': The !ClassTreeMaskObjectIterator handles all objects as [wiki:BaseObject BaseObjects]. If you want to use another class, you should use a dynamic_cast: 68 67 {{{ 69 68 for (ClassTreeMaskObjectIterator it = mask.begin(); it != mask.end(); ++it) … … 71 70 }}} 72 71 73 Performance of ClassTreeMaskObjectIterator is good as long as you don't exclude subclasses of included classes. Of course you can still exlucde subclasses, but if this is done more often, we need a new implementation using a second ObjectList in the Identifier, containing all objects of exactly one class. Including subclasses of excluded classes however is really fast.72 Performance of !ClassTreeMaskObjectIterator is good as long as you don't exclude subclasses of included classes. Of course you can still exlucde subclasses, but if this is done more often, we need a new implementation using a second ObjectList in the Identifier, containing all objects of exactly one class. Including subclasses of excluded classes however is really fast. 74 73 75 74 == Examples ==