package modules.region;

import utils.*;
import simulator.*;
import modules.gradient.*;
import java.util.*;

/*
  A latched region simply holds its current state, not propagating
 */

public class GradientRegion implements RegionMembershipTest {
  Object gid;
  public GradientRegion(Object gid) { this.gid=gid; }
  public boolean isMember(PortedProcessor pp) {
    ActiveGradient ag = (ActiveGradient)pp.getModule("ActiveGradient");
    Gradient g = ag.get(gid);
    return (g!=null && !g.isDead());
  }
}
