Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changes between Version 11 and Version 12 of code/doc/ClassTreeMask


Ignore:
Timestamp:
Sep 29, 2008, 3:29:17 AM (16 years ago)
Author:
landauf
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • code/doc/ClassTreeMask

    v11 v12  
    11= !ClassTreeMask =
    22[[TracNav(TracNav/TOC_Development)]]
     3[[TOC]]
    34
    45== Description ==
    56
    6 The [wiki:ClassTreeMask] defines a mask that includes or excludes branches and single classes in the [wiki:Identifier class-tree]. You can think of the [wiki:ClassTreeMask] like a mask in computer graphics: A mask is a black/white picture where black means invisible and white means fully visible. That way you can show some parts of an image and hide others. The [wiki:ClassTreeMask] does the same with the class-tree, but ''show'' means ''include'' and ''hide'' means ''exclude''. An unmodified mask shows everything / is white / includes the [wiki:BaseObject] (those statements are equivalent). '''Notation: Including or excluding a class is denoted as "adding a new rule".'''
     7The !ClassTreeMask defines a mask that includes or excludes branches and single classes in the [wiki:Identifier class-tree]. You can think of the !ClassTreeMask like a mask in computer graphics: A mask is a black/white picture where black means invisible and white means fully visible. That way you can show some parts of an image and hide others. The !ClassTreeMask does the same with the class-tree, but ''show'' means ''include'' and ''hide'' means ''exclude''. An unmodified mask shows everything / is white / includes the [wiki:BaseObject] (those statements are equivalent). '''Notation: Including or excluding a class is denoted as "adding a new rule".'''
    78
    89The [wiki:Identifier class-tree] starts with the [wiki:BaseObject] but has some additional Interfaces that are parents of some subclasses (or "nodes" in the speak of tree-structure). Because we can't include or exclude classes directly, we use the corresponding [wiki:Identifier Identifiers] instead. '''In the following we'll speak about "classes" but implicitly mean "the [wiki:Identifier Identifiers] of those classes".'''
     
    1011Including a class means: "The whole branch starting with this class gets included", unless you didn't set the ''overwrite'' flag to false. Including a class without overwriting means: "Include the whole branch starting with this class but don't include previously excluded classes". The same aplies for excluding.
    1112
    12 After including/excluding a class, the [wiki:ClassTreeMask] is scanned for useless rules. If you include the [wiki:BaseObject] and include a subclass of [wiki:BaseObject] too, this brings no new information, so the inclusion-rule of the subclass can be discarded. Only rules that change the state are saved. You can turn of this cleanup by setting the ''clean'' flag to false. '''Warning''': This could change the meaning of your mask when you add further rules with ''overwrite'' set to false. If, in our example, the subclass of [wiki:BaseObject] was included without ''clean'' and afterward you exclude the [wiki:BaseObject] without ''overwrite'', the subclass stays included. You'll find some examples for this in the corresponding section of this page.
     13After including/excluding a class, the !ClassTreeMask is scanned for useless rules. If you include the [wiki:BaseObject] and include a subclass of [wiki:BaseObject] too, this brings no new information, so the inclusion-rule of the subclass can be discarded. Only rules that change the state are saved. You can turn of this cleanup by setting the ''clean'' flag to false. '''Warning''': This could change the meaning of your mask when you add further rules with ''overwrite'' set to false. If, in our example, the subclass of [wiki:BaseObject] was included without ''clean'' and afterward you exclude the [wiki:BaseObject] without ''overwrite'', the subclass stays included. You'll find some examples for this in the corresponding section of this page.
    1314
    1415It's also possible to include/exclude only a single class wihtout changing the rule for following classes. This is achieved with the includeSingle/excludeSingle functions.
    1516
    16 Including/excluding interfaces is a bit different, because interfaces aren't directly in the class-tree. Instead the [wiki:ClassTreeMask] will apply the rule for all direct parents of the interfaces. If you set ''overwrite'' to false, only direct parents without an explicit rule apply the new rule. This may sound difficult, but it's really intutive. Just look at the examples.
     17Including/excluding interfaces is a bit different, because interfaces aren't directly in the class-tree. Instead the !ClassTreeMask will apply the rule for all direct parents of the interfaces. If you set ''overwrite'' to false, only direct parents without an explicit rule apply the new rule. This may sound difficult, but it's really intutive. Just look at the examples.
    1718
    1819== Functions ==
    1920
    20  * '''Branches''':
    21    * '''include('''''class''''', '''''overwrite''''', '''''clean''''')''': Includes ''class'' and all following classes. If ''overwrite'' is false, only classes that weren't explicitly excluded previously are included (default is true). If ''clean'' is true, only relevant rules stay in the branch (default is true).
    22    * '''exclude('''''class''''', '''''overwrite''''', '''''clean''''')''': Excludes ''class'' and all following classes. If ''overwrite'' is false, only classes that weren't explicitly included previously are excluded (default is true). If ''clean'' is true, only relevant rules stay in the branch (default is true).
    23 
    24  * '''Single classes''':
    25    * '''includeSingle('''''class''''', '''''clean''''')''': Includes ''class'' without changing the rule for following classes. If ''clean'' is true, only relevant rules stay in the branch (default is true).
    26    * '''excludeSingle('''''class''''', '''''clean''''')''': Excludes ''class'' without changing the rule for following classes. If ''clean'' is true, only relevant rules stay in the branch (default is true).
    27 
    28  * '''Tree''':
    29    * '''clean()''': Cleans the [wiki:ClassTreeMask] by droping all useless rules, where "useless" means: They add no new information to the mask (because a rule applied to a parent already sais the same).
    30    * '''reset()''': Deletes all rules and includes everything.
    31 
    32 == Operators ==
     21=== Branches ===
     22 * '''include('''''class''''', '''''overwrite''''', '''''clean''''')''': Includes ''class'' and all following classes. If ''overwrite'' is false, only classes that weren't explicitly excluded previously are included (default is true). If ''clean'' is true, only relevant rules stay in the branch (default is true).
     23 * '''exclude('''''class''''', '''''overwrite''''', '''''clean''''')''': Excludes ''class'' and all following classes. If ''overwrite'' is false, only classes that weren't explicitly included previously are excluded (default is true). If ''clean'' is true, only relevant rules stay in the branch (default is true).
     24
     25=== Single classes ===
     26 * '''includeSingle('''''class''''', '''''clean''''')''': Includes ''class'' without changing the rule for following classes. If ''clean'' is true, only relevant rules stay in the branch (default is true).
     27 * '''excludeSingle('''''class''''', '''''clean''''')''': Excludes ''class'' without changing the rule for following classes. If ''clean'' is true, only relevant rules stay in the branch (default is true).
     28
     29=== Tree ===
     30 * '''clean()''': Cleans the !ClassTreeMask by droping all useless rules, where "useless" means: They add no new information to the mask (because a rule applied to a parent already sais the same).
     31 * '''reset()''': Deletes all rules and includes everything.
     32
     33=== Operators ===
    3334
    3435It'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.