Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changes between Version 6 and Version 7 of code/doc/ClassTreeMask


Ignore:
Timestamp:
Feb 27, 2008, 10:52:12 PM (17 years ago)
Author:
landauf
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • code/doc/ClassTreeMask

    v6 v7  
    196196
    197197=== Inclusion and exclusion of interfaces ===
     198
     199[[Image(example10.gif, 200, right)]]
     200{{{
     201#!cpp
     202// Create a new mask and exclude Interface1
     203// This excludes all classes that inherit from Interface1, namely A2B2 and A3
     204
     205ClassTreeMask mymask;
     206mymask.exclude(Class(Interface1));
     207}}}
     208
     209[[br]]
     210[[br]]
     211
     212[[Image(example11.gif, 200, right)]]
     213{{{
     214#!cpp
     215// Create another mask: Exclude BaseObject but include A2 and A3
     216
     217ClassTreeMask mymask;
     218mymask.exclude(Class(BaseObject));
     219mymask.include(Class(A2));
     220mymask.include(Class(A3));
     221}}}
     222
     223[[br]]
     224
     225[[Image(example12.gif, 200, right)]]
     226{{{
     227#!cpp
     228// Now exclude Interface1 without overwrite
     229// This excludes A2B2 and all following classes, but it doesn't exclude
     230// A3 because A3 explicitly has it's own rule. If overwrite would have been
     231// set to true (which is default), A3 would be excluded too.
     232
     233mymask.exclude(Class(Interface1), false);
     234}}}
     235
     236[[br]]
     237[[br]]
     238
     239=== Operators ===
     240
     241In the following examples we use two masks: mask1 and mask2. They are defined in the following pieces of code:
     242
     243[[Image(example13.gif, 200, right)]]
     244{{{
     245#!cpp
     246// Create mask1:
     247
     248ClassTreeMask mask1;
     249mask1.exclude(Class(A1B1));
     250mask1.exclude(Class(A2));
     251mask1.include(Class(A2B2));
     252mask1.exclude(Class(A2B2C1));
     253mask1.exclude(Class(A3B1));
     254mask1.include(Class(A3B1C2));
     255mask1.exclude(Class(A3B2C1));
     256mask1.exclude(Class(A3B2C2));
     257}}}
     258
     259[[Image(example14.gif, 200, right)]]
     260{{{
     261#!cpp
     262// Create mask2:
     263
     264ClassTreeMask mask2;
     265mask2.exclude(Class(BaseObject));
     266mask2.include(Class(A1));
     267mask2.exclude(Class(A1B2));
     268mask2.exclude(Class(A1B1C2));
     269mask2.include(Class(A2));
     270mask2.exclude(Class(A2B2));
     271mask2.include(Class(A3B1));
     272mask2.include(Class(A3B2));
     273mask2.exclude(Class(A3B2C2));
     274}}}