| 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 | |
| 205 | ClassTreeMask mymask; |
| 206 | mymask.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 | |
| 217 | ClassTreeMask mymask; |
| 218 | mymask.exclude(Class(BaseObject)); |
| 219 | mymask.include(Class(A2)); |
| 220 | mymask.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 | |
| 233 | mymask.exclude(Class(Interface1), false); |
| 234 | }}} |
| 235 | |
| 236 | [[br]] |
| 237 | [[br]] |
| 238 | |
| 239 | === Operators === |
| 240 | |
| 241 | In 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 | |
| 248 | ClassTreeMask mask1; |
| 249 | mask1.exclude(Class(A1B1)); |
| 250 | mask1.exclude(Class(A2)); |
| 251 | mask1.include(Class(A2B2)); |
| 252 | mask1.exclude(Class(A2B2C1)); |
| 253 | mask1.exclude(Class(A3B1)); |
| 254 | mask1.include(Class(A3B1C2)); |
| 255 | mask1.exclude(Class(A3B2C1)); |
| 256 | mask1.exclude(Class(A3B2C2)); |
| 257 | }}} |
| 258 | |
| 259 | [[Image(example14.gif, 200, right)]] |
| 260 | {{{ |
| 261 | #!cpp |
| 262 | // Create mask2: |
| 263 | |
| 264 | ClassTreeMask mask2; |
| 265 | mask2.exclude(Class(BaseObject)); |
| 266 | mask2.include(Class(A1)); |
| 267 | mask2.exclude(Class(A1B2)); |
| 268 | mask2.exclude(Class(A1B1C2)); |
| 269 | mask2.include(Class(A2)); |
| 270 | mask2.exclude(Class(A2B2)); |
| 271 | mask2.include(Class(A3B1)); |
| 272 | mask2.include(Class(A3B2)); |
| 273 | mask2.exclude(Class(A3B2C2)); |
| 274 | }}} |