Ejemplo n.º 1
0
 public void ecrireEnregistrement(Programme prog, StringBuffer buf, int indent) {
   Divers.ecrire(buf, "function " + nom + "()" + " {", indent);
   for (Iterator<org.javascool.proglets.plurialgo.langages.modele.Variable> iter =
           proprietes.iterator();
       iter.hasNext(); ) {
     Variable prop = (Variable) iter.next();
     prop.ecrirePropriete(prog, buf, indent + 1);
   }
   Divers.ecrire(buf, "}", indent);
 }
Ejemplo n.º 2
0
 public void ecrire(Programme prog, StringBuffer buf, int indent) {
   Divers.ecrire(buf, "function " + nom + "()" + " {", indent);
   if ((proprietes.size() > 0)) prog.commenter(buf, "proprietes", indent + 1);
   for (Iterator<org.javascool.proglets.plurialgo.langages.modele.Variable> iter =
           proprietes.iterator();
       iter.hasNext(); ) {
     Variable prop = (Variable) iter.next();
     prop.ecrirePropriete(prog, buf, indent + 1);
   }
   if ((operations.size() > 0)) prog.commenter(buf, "methodes", indent + 1);
   for (Iterator<org.javascool.proglets.plurialgo.langages.modele.Operation> iter =
           operations.iterator();
       iter.hasNext(); ) {
     Operation oper = (Operation) iter.next();
     Divers.ecrire(buf, "this." + oper.nom + "=" + oper.nom + ";", indent + 1);
   }
   Divers.ecrire(buf, "}", indent);
   for (Iterator<org.javascool.proglets.plurialgo.langages.modele.Operation> iter =
           operations.iterator();
       iter.hasNext(); ) {
     Operation oper = (Operation) iter.next();
     oper.ecrire(prog, buf, indent);
   }
 }