it's the end of the world as we know it
[potlatch2.git] / net / systemeD / halcyon / styleparser / Rule.as
1 package net.systemeD.halcyon.styleparser {
2
3         public class Rule {
4
5                 public var conditions:Array;
6                 public var breaker:Boolean = true;
7                 public var isAnd:Boolean = true;
8                 public var minScale:uint = 19;
9                 public var maxScale:uint = 13;
10
11                 public function test(tags:Object):Boolean {
12                         var v:Boolean; var i:uint=0;
13                         for each (var condition:Condition in conditions) {
14                                 var r:Boolean=condition.test(tags);
15                                 if (i==0) { v=r; }
16                                 else if (isAnd) { v=v && r; }
17                                 else { v = v || r;}
18                                 i++;
19                         }
20                         return v;
21                 }
22         }
23 }