Changeset 42 for XMLIO_SERVER/trunk/src/XMLIO/mod_file.f90
- Timestamp:
- 10/30/09 16:29:39 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XMLIO_SERVER/trunk/src/XMLIO/mod_file.f90
r40 r42 29 29 TYPE(sorted_list),POINTER,SAVE,PRIVATE :: Ids 30 30 31 INTERFACE file__set_attribut 32 MODULE PROCEDURE file__set_attribut_id,file__set_attribut_pt 33 END INTERFACE 34 31 35 CONTAINS 32 36 INCLUDE 'vector_file_contains.inc' … … 138 142 END SUBROUTINE file__set 139 143 140 SUBROUTINE file__set_attribut(id,attrib) 144 SUBROUTINE file__set_attribut_id(id,attrib,ok) 145 USE mod_attribut 146 USE error_msg 147 IMPLICIT NONE 148 CHARACTER(LEN=*),INTENT(IN) :: id 149 TYPE(attribut),INTENT(IN) :: attrib 150 LOGICAL,OPTIONAL,INTENT(OUT) :: ok 151 152 TYPE(file),POINTER :: Pt_file 153 INTEGER :: Pos 154 LOGICAL :: success 155 156 CALL sorted_list__find(Ids,hash(Id),Pos,success) 157 IF (success) THEN 158 Pt_file=>file_ids%at(Pos)%Pt 159 CALL file__set_attribut_pt(Pt_file,attrib) 160 IF (PRESENT(OK)) OK=.TRUE. 161 ELSE 162 IF (.NOT.PRESENT(OK)) THEN 163 WRITE(message,*) 'File id : ',id,' is undefined' 164 CALL error('mod_file::file__set_attribut') 165 ELSE 166 OK=.FALSE. 167 ENDIF 168 ENDIF 169 170 END SUBROUTINE file__set_attribut_id 171 172 SUBROUTINE file__set_attribut_pt(Pt_file,attrib) 141 173 USE mod_attribut 142 174 USE mod_file_attribut 143 175 USE error_msg 144 176 IMPLICIT NONE 145 CHARACTER(LEN=*),INTENT(IN) :: id177 TYPE(file),POINTER :: Pt_file 146 178 TYPE(attribut),INTENT(IN) :: attrib 147 179 148 TYPE(file),POINTER :: Pt_file149 INTEGER :: Pos150 LOGICAL :: success151 152 CALL sorted_list__find(Ids,hash(Id),Pos,success)153 IF (success) THEN154 Pt_file=>file_ids%at(Pos)%Pt155 ELSE156 WRITE(message,*) 'File id :',id,'is undefined'157 CALL error('mod_file::file__set_attribut')158 ENDIF159 180 160 181 SELECT CASE(attrib%name) … … 173 194 END SELECT 174 195 175 WRITE(message,*) 'file id ',id,' : Attribute type is incompatible with the provided value'196 WRITE(message,*) 'file attribut ',attrib%name,' : type : ',attrib%type,' : Attribute type is incompatible with the provided value' 176 197 CALL error('mod_file::file__set_attribut') 177 198 178 END SUBROUTINE file__set_attribut 199 END SUBROUTINE file__set_attribut_pt 179 200 180 201
Note: See TracChangeset
for help on using the changeset viewer.