Ignore:
Timestamp:
11/27/06 12:22:36 (5 years ago)
Author:
sys
Message:

Controle d'unicité de la table des composants fils et compType fils

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Jav_CO/com/scenari/m/co/composant/HComposantType.java

    r7458 r7518  
    387387     */ 
    388388    public final void wAddCompTypeChild(IHComposantType pCompTypeChild) { 
     389        String vCode = pCompTypeChild.hGetCode(); 
     390        IHComposantType vPrev = null; 
     391        IHComposantType vCh = fFirst; 
     392        while(vCh != null){ 
     393                if(vCh.hGetCode().equals(vCode)) { 
     394                        //On remplace 
     395                        if(vPrev==null){ 
     396                                fFirst = vPrev; 
     397                        } else { 
     398                                vPrev.wSetNextCompType(pCompTypeChild); 
     399                        } 
     400                        pCompTypeChild.wSetNextCompType(vCh.wGetNextCompType()); 
     401                        return; 
     402                } 
     403                vPrev = vCh; 
     404                vCh = vCh.wGetNextCompType(); 
     405        } 
     406        //Pas trouvé, on ajoute 
    389407        pCompTypeChild.wSetNextCompType(fFirst); 
    390408        fFirst = pCompTypeChild; 
Note: See TracChangeset for help on using the changeset viewer.