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 PathSegment {
  protected PositiveConstraint node;
  public PositiveConstraint get_node() { return node; }
  public void set_node(PositiveConstraint new_node) { node = new_node; }
  protected NegativeConstraint constraint;
  public NegativeConstraint get_constraint() { return constraint; }
  public void set_constraint(NegativeConstraint new_constraint) { constraint = new_constraint; }
  public PathSegment() { super(); }
  public PathSegment(PositiveConstraint node, NegativeConstraint constraint) {
    super();
    set_node(node);
    set_constraint(constraint);
  }
  public static PathSegment parse(java.io.Reader in) throws ParseException { return new Parser(in)._PathSegment(); }
  public static PathSegment parse(java.io.InputStream in) throws ParseException { return new Parser(in)._PathSegment(); }
  public static PathSegment 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_);
    ((UniversalVisitor) _v_).before_node(this, node);
    node.universal_trv0(_v_);
    ((UniversalVisitor) _v_).after_node(this, node);
    if (constraint != null) {
      ((UniversalVisitor) _v_).before_constraint(this, constraint);
      constraint.universal_trv0(_v_);
      ((UniversalVisitor) _v_).after_constraint(this, constraint);
    }
    universal_trv0_aft(_v_);
  }

}
