package CSU670_Plugin.gen;
import edu.neu.ccs.demeter.dj.*;
import edu.neu.ccs.demeter.aplib.cd.ClassDefVisitor;
import edu.neu.ccs.demeter.aplib.cd.ClassDef;
import java.io.*;
import java.util.*;
import edu.neu.ccs.demeter.*;
class SGEdge {
  protected SourceMarker sourcemarker;
  public SourceMarker get_sourcemarker() { return sourcemarker; }
  public void set_sourcemarker(SourceMarker new_sourcemarker) { sourcemarker = new_sourcemarker; }
  protected GlobSpec source;
  public GlobSpec get_source() { return source; }
  public void set_source(GlobSpec new_source) { source = new_source; }
  protected TargetMarker targetmarker;
  public TargetMarker get_targetmarker() { return targetmarker; }
  public void set_targetmarker(TargetMarker new_targetmarker) { targetmarker = new_targetmarker; }
  protected GlobSpec target;
  public GlobSpec get_target() { return target; }
  public void set_target(GlobSpec new_target) { target = new_target; }
  protected NegativeConstraint constraint;
  public NegativeConstraint get_constraint() { return constraint; }
  public void set_constraint(NegativeConstraint new_constraint) { constraint = new_constraint; }
  public SGEdge() { super(); }
  public SGEdge(SourceMarker sourcemarker, GlobSpec source, TargetMarker targetmarker, GlobSpec target, NegativeConstraint constraint) {
    super();
    set_sourcemarker(sourcemarker);
    set_source(source);
    set_targetmarker(targetmarker);
    set_target(target);
    set_constraint(constraint);
  }
  public static SGEdge parse(java.io.Reader in) throws ParseException { return new Parser(in)._SGEdge(); }
  public static SGEdge parse(java.io.InputStream in) throws ParseException { return new Parser(in)._SGEdge(); }
  public static SGEdge parse(String s) {
    try { return parse(new java.io.StringReader(s)); }
    catch (ParseException e) {
      throw new RuntimeException(e.toString());
    }
  }
  void universal_trv0_bef(UniversalVisitor _v_) {
    ((UniversalVisitor) _v_).before(this);
  }

  void universal_trv0_aft(UniversalVisitor _v_) {
    ((UniversalVisitor) _v_).after(this);
  }

  void universal_trv0(UniversalVisitor _v_) {
    universal_trv0_bef(_v_);
    if (sourcemarker != null) {
      ((UniversalVisitor) _v_).before_sourcemarker(this, sourcemarker);
      sourcemarker.universal_trv0(_v_);
      ((UniversalVisitor) _v_).after_sourcemarker(this, sourcemarker);
    }
    ((UniversalVisitor) _v_).before_source(this, source);
    source.universal_trv0(_v_);
    ((UniversalVisitor) _v_).after_source(this, source);
    if (targetmarker != null) {
      ((UniversalVisitor) _v_).before_targetmarker(this, targetmarker);
      targetmarker.universal_trv0(_v_);
      ((UniversalVisitor) _v_).after_targetmarker(this, targetmarker);
    }
    ((UniversalVisitor) _v_).before_target(this, target);
    target.universal_trv0(_v_);
    ((UniversalVisitor) _v_).after_target(this, target);
    if (constraint != null) {
      ((UniversalVisitor) _v_).before_constraint(this, constraint);
      constraint.universal_trv0(_v_);
      ((UniversalVisitor) _v_).after_constraint(this, constraint);
    }
    universal_trv0_aft(_v_);
  }

}
