예제 #1
0
 public void register(SpudBase s)
 {
     rootSpuds.Add(s);
     allSpuds.Add(s);
     lock (dirtySpuds)
         dirtySpuds[s] = true;
 }
예제 #2
0
 public void remove(SpudBase spud)
 {
     spud.beDead();
     allSpuds.Remove(spud);
     lock (dirtySpuds)
         if (dirtySpuds.ContainsKey(spud))
         {
             dirtySpuds.Remove(spud);
         }
     if (rootSpuds.Contains(spud))
     {
         rootSpuds.Remove(spud);
     }
     if (havePushedDown.ContainsKey(spud))
     {
         havePushedDown.Remove(spud);
     }
 }
예제 #3
0
 public void hasParent(SpudBase child)
 {
     rootSpuds.Remove(child);
 }
예제 #4
0
 public void pushedDown(SpudBase spud)
 {
     requireInPushDown();
     havePushedDown[spud] = spud;
 }
예제 #5
0
 public void makeDirty(SpudBase spud)
 {
     lock (dirtySpuds)
         dirtySpuds[spud] = true;
 }
예제 #6
0
 public void makeClean(SpudBase spud)
 {
     lock (dirtySpuds)
         dirtySpuds.Remove(spud);
 }
예제 #7
0
 public bool hasPushedDown(SpudBase spud)
 {
     requireInPushDown();
     return(havePushedDown.ContainsKey(spud));
 }
예제 #8
0
 void addChild(SpudBase child)
 {
     requireAlive();
     children.Add(child);
 }
예제 #9
0
 bool hasDescendent(SpudBase spud)
 {
     return(children.Contains(spud) || hasContent(accept(children, child => child.hasDescendent(spud))));
 }
예제 #10
0
 public void removeChild(SpudBase child)
 {
     Bomb.unless(children.Remove(child), () => "can't remove nonexistant child!");
 }
예제 #11
0
 public DoesNotDependsOnProperly(SpudBase spud) : base(spud.manager)
 {
 }