package EDU.neu.ccs.demeter.tools.apstudio.graphedit;
import java.awt.*;
import java.io.*;
import java.util.*;
import EDU.neu.ccs.demeter.*;
import EDU.neu.ccs.demeter.common.tg.*;


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; }
  PathSegment() { super(); }
  public PathSegment(PositiveConstraint node, NegativeConstraint constraint) {
    super();
    set_node(node);
    set_constraint(constraint);
  }
  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.ByteArrayInputStream(s.getBytes())); }
    catch (ParseException e) { throw new RuntimeException(e.toString()); }
  }
  void universal_trv0_bef(UniversalVisitor _v_) {
    _v_.before(this);
  }
  void universal_trv0_aft(UniversalVisitor _v_) {
    _v_.after(this);
  }
  void universal_trv0(UniversalVisitor _v_) {
    universal_trv0_bef(_v_);
    _v_.before_node(this, node);
    node.universal_trv0(_v_);
    _v_.after_node(this, node);
    if (constraint != null) {
      _v_.before_constraint(this, constraint);
    constraint.universal_trv0(_v_);
      _v_.after_constraint(this, constraint);
    }
    universal_trv0_aft(_v_);
  }
  void toAllSubclasses_Program_trv_bef(ClassNameTranspVisitor cntv, EdgeVisitor aev) {  }
  void toAllSubclasses_Program_trv_aft(ClassNameTranspVisitor cntv, EdgeVisitor aev) {  }
  void toAllSubclasses_Program_trv(ClassNameTranspVisitor cntv, EdgeVisitor aev) {
    toAllSubclasses_Program_trv_bef(cntv, aev);
    node.toAllSubclasses_Program_trv(cntv, aev);
    if (constraint != null) {
    constraint.toAllSubclasses_Program_trv(cntv, aev);
    }
    toAllSubclasses_Program_trv_aft(cntv, aev);
  }
  void checkStars_ProgramBehavior_trv_bef(DummyVisitor dv) {  }
  void checkStars_ProgramBehavior_trv_aft(DummyVisitor dv) {  }
  void checkStars_ProgramBehavior_trv(DummyVisitor dv) {
    checkStars_ProgramBehavior_trv_bef(dv);
    node.checkStars_ProgramBehavior_trv(dv);
    if (constraint != null) {
    constraint.checkStars_ProgramBehavior_trv(dv);
    }
    checkStars_ProgramBehavior_trv_aft(dv);
  }
  void __trav_toGraph_PathDirective_trv_bef(__V_PathDirective_toGraph __v0) {  }
  void __trav_toGraph_PathDirective_trv_aft(__V_PathDirective_toGraph __v0) {  }
  void __trav_toGraph_PathDirective_trv(__V_PathDirective_toGraph __v0) {
    __trav_toGraph_PathDirective_trv_bef(__v0);
    node.__trav_toGraph_PathDirective_trv(__v0);
    if (constraint != null) {
    constraint.__trav_toGraph_PathDirective_trv(__v0);
    }
    __trav_toGraph_PathDirective_trv_aft(__v0);
  }
}

