Package ds.moteur.route

Examples of ds.moteur.route.Section


  public void load(DataInputStream dis) throws IOException {
    //Reconstitution des sections
    int nSections = dis.readShort();
    for(int i=0; i<nSections; i++){
      Section section = new Section();;
      section.load(dis);
      this.addSection(section);
    }
   
    //Reconstitution des connexions entre sections
    for(int i=0; i<nSections; i++){
      int nConnexions = dis.readShort();
      for(int j=0; j<nConnexions; j++){
        int index = dis.readShort();
        sections.get(i).addConnexion(sections.get(index));
      }
    }
    this.etablirConnexion();
   
    //Reconstitution des points d'insertion
    int nInsertions = dis.readShort();
    for(int i=0; i<nInsertions; i++){
      int indexSection = dis.readShort();
      Section section = sections.get(indexSection);
      int indexEntree = dis.readShort();
      PointEntree entree = section.getEntrees().get(indexEntree);
      this.addInsertion(entree);
    }
  }
View Full Code Here


    }
   
    //Sauvegarde des points d'insertion
    dos.writeShort(insertions.size());
    for (PointEntree entree : insertions){
      Section section = entree.getCourbes().get(0).getOrigine();
      int indexSection = sections.indexOf(section);
      dos.writeShort(indexSection);
      int indexEntree = section.getEntrees().indexOf(entree);
      dos.writeShort(indexEntree);
    }
  }
View Full Code Here

TOP

Related Classes of ds.moteur.route.Section

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.