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 SaveGraphVisitor extends UniversalVisitor {
  protected String graphString;
  public String get_graphString() { return graphString; }
  public void set_graphString(String new_graphString)
    { graphString = new_graphString; }
  SaveGraphVisitor() { super(); }
  public SaveGraphVisitor(String graphString) {
    super();
    set_graphString(graphString);
  }
  public void before(UGraph host) { graphString  = graphString + "#Class #Dictionary #Graph\n"; }
  public void before(Package host) { graphString  = graphString + "\npackage "; }
  public void before(PackageName host) { graphString  = graphString + host.toString();}
  public void before(Name host) { graphString  = graphString + host.toString();}
  public void before(Import host) { graphString  = graphString + "import ";}
  public void after(Import host) { graphString  = graphString + ";\n";}
  public void before(ImportAllClasses host) { graphString  = graphString + ".*";}
  public void after(Package host) { graphString  = graphString + ";\n" ; }
  public void before(JavaCode host) { graphString  = graphString + "\n(@" + host.get_code() + "@" + ")\n"; }
  public void before(UVertex_List host) { graphString = graphString  + "#Vertex #List\n"; }
  public void before(UConstVertex host) { graphString = graphString +"\n#ConstVertex "; }
  public void before(UBefore host) { graphString = graphString + "#Before \"" + host.get_syntax() + "\" "; }
  public void before(UAfter host) { graphString = graphString + "#After \"" + host.get_syntax() + "\" "; }
  public void before(UAltVertex host) { graphString = graphString + "\n#AltVertex "; }
  public void before(PublicIdentifier host) { graphString = graphString + "#public "; }
  public void before(FinalIdentifier host) { graphString = graphString + "#final "; }
  public void before(YaParse host) { graphString = graphString + "#parse "; }
  public void before(NopParse host) { graphString = graphString + "#noparse "; }
  public void before(UInterface host) { graphString = graphString + "\n#Interface "; }
  public void before(PublicModifier host) { graphString = graphString + "#public "; }
  public void before(UTermConstVertex host) { graphString = graphString +"\n#TermConstVertex "; }
  public void before(UTermInterface host) { graphString = graphString +"\n#TermInterface "; }
  public void before(UVertexName host) { graphString = graphString + host.get_name() +" "; }
  public void before(Coordinates host) { graphString = graphString + " { "; }
  public void before(X host) { graphString = graphString + host.get_x() +" "; }
  public void before(Y host) { graphString = graphString + host.get_y() +" "; }
  public void after(Coordinates host) { graphString = graphString + "} "; }
  public void before(IEdge_List host) { graphString = graphString + "#Incoming "; }
  public void before(UID host) { graphString = graphString + host.get_id() + " " ; }
  public void before_next(Nonempty_IEdge_List source, Nonempty_IEdge_List dest) { graphString = graphString  + ", "; }
  public void before_next(Nonempty_OEdge_List source, Nonempty_OEdge_List dest) { graphString = graphString  + ", "; }
  public void before(OEdge_List host) { graphString = graphString + "#Outgoing "; }
  public void before(UEdge_List host) {graphString  = graphString + "\n#Edge #List\n"; }
  public void before(UAltEdge host) { graphString = graphString + "\n#AltEdge "; }
  public void before(UExtendEdge host) { graphString = graphString + "\n#ExtendEdge "; }
  public void before(UImplEdge host) { graphString = graphString + "\n#ImplEdge "; }
  public void before(UConstEdge host) { graphString = graphString + "\n#ConstEdge "; }
  public void before(UEdgeName host) { graphString = graphString + host.get_name() +" "; }
  public void before(Cardinality host) { graphString = graphString + "#Cardinality "; }
  public void before(Lower host) { graphString = graphString + host.get_l(); }
  public void before(Upper host) { graphString = graphString + "..\"" + host.get_u() + "\" "; }
  public void after(Cardinality host) { graphString = graphString + " "; }
  public void before(FinalMod host) { graphString = graphString + "#final"; }
  public void before(StaticMod host) { graphString = graphString + "#static"; }
  public void before(ReadOnlyMod host) { graphString = graphString + "#read-only"; }
  public void before(PrivateMod host) { graphString = graphString + "#private"; }
  void universal_trv0_bef(UniversalVisitor _v_) {
    super.universal_trv0_bef(_v_);
  }
  void universal_trv0_aft(UniversalVisitor _v_) {
    super.universal_trv0_aft(_v_);
  }
  void universal_trv0(UniversalVisitor _v_) {
    universal_trv0_bef(_v_);
    super.universal_trv0(_v_);
    universal_trv0_aft(_v_);
  }
}

