Ignore:
Timestamp:
10/30/09 16:29:39 (15 years ago)
Author:
ymipsl
Message:

Correction bug sur les ids des file_group
+ possibilité de fixer les attributs des groupes à partir de l'ioserver

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XMLIO_SERVER/trunk/src/XMLIO/mod_zoom.f90

    r40 r42  
    3030  TYPE(vector_zoom),POINTER,SAVE             :: zoom_Ids 
    3131  TYPE(sorted_list),POINTER,SAVE,PRIVATE     :: Ids  
     32 
     33  INTERFACE zoom__set_attribut 
     34    MODULE PROCEDURE zoom__set_attribut_id,zoom__set_attribut_pt 
     35  END INTERFACE 
    3236   
    3337CONTAINS 
     
    120124   END SUBROUTINE zoom__set    
    121125 
    122  SUBROUTINE zoom__set_attribut(id,attrib) 
     126  SUBROUTINE zoom__set_attribut_id(id,attrib,ok) 
     127  USE mod_attribut 
     128  USE error_msg 
     129  IMPLICIT NONE 
     130    CHARACTER(LEN=*),INTENT(IN)   :: id 
     131    TYPE(attribut),INTENT(IN)     :: attrib 
     132    LOGICAL,OPTIONAL,INTENT(OUT)  :: ok 
     133     
     134    TYPE(zoom),POINTER              :: Pt_zoom 
     135    INTEGER                         :: Pos 
     136    LOGICAL                         :: success 
     137     
     138    CALL sorted_list__find(Ids,hash(Id),Pos,success) 
     139    IF (success) THEN 
     140      Pt_zoom=>zoom_ids%at(Pos)%Pt 
     141      CALL zoom__set_attribut_pt(Pt_zoom,attrib) 
     142      IF (PRESENT(OK)) OK=.TRUE. 
     143    ELSE 
     144      IF (.NOT.PRESENT(OK)) THEN 
     145        WRITE(message,*) 'zoom id :',id,'is undefined' 
     146        CALL error('mod_zoom::zoom__set_attribut') 
     147      ELSE 
     148        OK=.FALSE. 
     149      ENDIF 
     150    ENDIF   
     151   
     152  END SUBROUTINE zoom__set_attribut_id 
     153       
     154  SUBROUTINE zoom__set_attribut_pt(Pt_zoom,attrib) 
    123155  USE mod_attribut 
    124156  USE mod_zoom_attribut 
    125157  USE error_msg 
    126158  IMPLICIT NONE 
    127     CHARACTER(LEN=*),INTENT(IN) :: id 
     159    TYPE(zoom),POINTER        :: Pt_zoom 
    128160    TYPE(attribut),INTENT(IN) :: attrib 
    129  
    130     TYPE(zoom),POINTER             :: Pt_zoom 
    131     INTEGER                         :: Pos 
    132     LOGICAL                         :: success 
    133      
    134     CALL sorted_list__find(Ids,hash(Id),Pos,success) 
    135     IF (success) THEN 
    136       Pt_zoom=>zoom_ids%at(Pos)%Pt 
    137     ELSE 
    138       WRITE(message,*) 'zoom id :',id,'is undefined' 
    139       CALL error('mod_zoom::zoom__set_attribut') 
    140     ENDIF   
    141161     
    142162    SELECT CASE(attrib%name) 
     
    155175     END SELECT 
    156176 
    157      WRITE(message,*) 'zoom id ',id,' : Attribute type is incompatible with the provided value' 
     177     WRITE(message,*) 'zoom attribut ',attrib%name,' : type :',attrib%type,' : Attribute type is incompatible with the provided value' 
    158178     CALL error('mod_zoom::zoom__set_attribut') 
    159179     
    160   END SUBROUTINE zoom__set_attribut 
     180  END SUBROUTINE zoom__set_attribut_pt 
    161181 
    162182  SUBROUTINE zoom__get(Id,pt_zoom) 
Note: See TracChangeset for help on using the changeset viewer.