public void register(SpudBase s) { rootSpuds.Add(s); allSpuds.Add(s); lock (dirtySpuds) dirtySpuds[s] = true; }
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); } }
public void hasParent(SpudBase child) { rootSpuds.Remove(child); }
public void pushedDown(SpudBase spud) { requireInPushDown(); havePushedDown[spud] = spud; }
public void makeDirty(SpudBase spud) { lock (dirtySpuds) dirtySpuds[spud] = true; }
public void makeClean(SpudBase spud) { lock (dirtySpuds) dirtySpuds.Remove(spud); }
public bool hasPushedDown(SpudBase spud) { requireInPushDown(); return(havePushedDown.ContainsKey(spud)); }
void addChild(SpudBase child) { requireAlive(); children.Add(child); }
bool hasDescendent(SpudBase spud) { return(children.Contains(spud) || hasContent(accept(children, child => child.hasDescendent(spud)))); }
public void removeChild(SpudBase child) { Bomb.unless(children.Remove(child), () => "can't remove nonexistant child!"); }
public DoesNotDependsOnProperly(SpudBase spud) : base(spud.manager) { }