Index: XMLIO_V2/dev/dev_rv/src/xmlio/fortran/ixmlioserver.f90
===================================================================
--- XMLIO_V2/dev/dev_rv/src/xmlio/fortran/ixmlioserver.f90	(revision 154)
+++ 	(revision )
@@ -1,985 +1,0 @@
-
-
-! --------------------------------------------- !
-! IXMLIOSERVER !
-! GESTION DES ENTREES-SORTIES !
-! --------------------------------------------- !
-
-
-
-MODULE IXMLIOSERVER
-   USE ISO_C_BINDING
-
-   ! Ne jamais modifier les valeurs internes de ce type dans le code fortran.
-   TYPE XHandle
-      INTEGER(kind = C_INTPTR_T) :: daddr
-   END TYPE XHandle
-
-   ! enum XDType
-   INTEGER(kind = C_INT), PARAMETER :: NOTYPE = 0
-   INTEGER(kind = C_INT), PARAMETER :: DTREATMENT = 1, DDATE = 2, CALENDAR = 3, ECONTEXT = 4
-   INTEGER(kind = C_INT), PARAMETER :: EAXIS = 5 , EDOMAIN = 6 , EFIELD = 7 , EFILE = 8 , EGRID = 9
-   INTEGER(kind = C_INT), PARAMETER :: GAXIS = 10, GDOMAIN = 11, GFIELD = 12, GFILE = 13, GGRID = 14
-
-   ! enum XCalendarType
-   INTEGER(kind = C_INT), PARAMETER :: D360 = 0 , ALLLEAP = 1 , NOLEAP = 2 , JULIAN = 3 , GREGORIAN = 4
-
-   TYPE XDate
-      INTEGER :: year, month, day, hour, minute, second
-   END TYPE XDate
-
-   TYPE XDuration
-      REAL(kind = 8) :: year, month, day, hour, minute, second
-   END TYPE XDuration
-
-   ! Autres constantes
-   TYPE(XHandle) , PARAMETER :: NULLHANDLE = XHandle(0)
-
-   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
-
-      SUBROUTINE xios_handle_create(ret, dtype, idt, idt_size) BIND(C)
-         import C_CHAR, C_INTPTR_T, C_INT
-         INTEGER (kind = C_INTPTR_T) :: ret
-         INTEGER (kind = C_INT), VALUE :: dtype
-         CHARACTER(kind = C_CHAR), DIMENSION(*) :: idt
-         INTEGER (kind = C_INT), VALUE :: idt_size
-      END SUBROUTINE xios_handle_create
-
-      SUBROUTINE xios_set_timestep(ts_year, ts_month, ts_day, &
-                                   ts_hour, ts_minute, ts_second) BIND(C)
-         import C_DOUBLE
-         REAL (kind = C_DOUBLE), VALUE :: ts_year, ts_month, ts_day, &
-                                          ts_hour, ts_minute, ts_second
-      END SUBROUTINE xios_set_timestep
-
-      SUBROUTINE xios_update_calendar(step) BIND(C)
-         import C_INT
-         INTEGER (kind = C_INT), VALUE :: step
-      END SUBROUTINE xios_update_calendar
-
-      SUBROUTINE xios_xml_tree_add(parent_, parent_type, child_, child_type, child_id, child_id_size) BIND(C)
-         import C_CHAR, C_INT, C_INTPTR_T
-         INTEGER (kind = C_INTPTR_T), VALUE :: parent_
-         INTEGER (kind = C_INT), VALUE :: parent_type
-         INTEGER (kind = C_INTPTR_T) :: child_
-         INTEGER (kind = C_INT), VALUE :: child_type
-         CHARACTER(kind = C_CHAR), DIMENSION(*) :: child_id
-         INTEGER (kind = C_INT), VALUE :: child_id_size
-      END SUBROUTINE xios_xml_tree_add
-
-      SUBROUTINE xios_xml_tree_show(filename, filename_size) BIND(C)
-         import C_CHAR, C_INT
-         CHARACTER(kind = C_CHAR), DIMENSION(*) :: filename
-         INTEGER (kind = C_INT), VALUE :: filename_size
-      END SUBROUTINE xios_xml_tree_show
-
-      SUBROUTINE xios_xml_parse_file(filename, filename_size) BIND(C)
-         import C_CHAR, C_INT
-         CHARACTER(kind = C_CHAR), DIMENSION(*) :: filename
-         INTEGER (kind = C_INT), VALUE :: filename_size
-      END SUBROUTINE xios_xml_Parse_File
-
-      SUBROUTINE xios_xml_parse_string(xmlcontent, xmlcontent_size) BIND(C)
-         import C_CHAR, C_INT
-         CHARACTER(kind = C_CHAR), DIMENSION(*) :: xmlcontent
-         INTEGER (kind = C_INT), VALUE :: xmlcontent_size
-      END SUBROUTINE xios_xml_Parse_String
-
-      SUBROUTINE xios_context_set_current(context, withswap) BIND(C)
-         import C_BOOL, C_INT, C_INTPTR_T
-         INTEGER (kind = C_INTPTR_T), VALUE :: context
-         LOGICAL (kind = C_BOOL), VALUE :: withswap
-      END SUBROUTINE xios_context_set_current
-
-      SUBROUTINE xios_context_create(context, context_id, context_id_size, calendar_type, &
-                                     year, month, day, hour, minute, second) BIND(C)
-         import C_CHAR, C_INT, C_INTPTR_T
-         INTEGER (kind = C_INTPTR_T) :: context
-         CHARACTER(kind = C_CHAR), DIMENSION(*) :: context_id
-         INTEGER (kind = C_INT), VALUE :: context_id_size
-         INTEGER (kind = C_INT), VALUE :: calendar_type, year, month, day, hour, minute, second
-      END SUBROUTINE xios_context_create
-
-      SUBROUTINE xios_dtreatment_start(context_hdl, filetype) BIND(C)
-         import C_INTPTR_T, C_INT
-         INTEGER (kind = C_INTPTR_T), VALUE :: context_hdl
-         INTEGER (kind = C_INT), VALUE :: filetype
-      END SUBROUTINE xios_dtreatment_start
-
-      SUBROUTINE xios_dtreatment_end() BIND(C)
-         ! Sans argument
-      END SUBROUTINE xios_dtreatment_end
-
-      SUBROUTINE xios_write_data(fieldid, fieldid_size, data_k8, data_Xsize, data_Ysize, data_Zsize) BIND(C)
-         import C_INT, C_CHAR, C_PTR, C_FLOAT, C_DOUBLE, C_BOOL
-         CHARACTER(kind = C_CHAR), DIMENSION(*) :: fieldid
-         INTEGER (kind = C_INT), VALUE :: fieldid_size
-         REAL(kind = C_DOUBLE), DIMENSION(*) :: data_k8
-         INTEGER (kind = C_INT), VALUE :: data_Xsize, data_Ysize, data_Zsize
-      END SUBROUTINE xios_write_data
-SUBROUTINE xios_set_axis_name(axis_hdl, ftype ,name ,name_size) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- CHARACTER(kind = C_CHAR), DIMENSION(*) :: name
- INTEGER (kind = C_INT) :: name_size
- END SUBROUTINE xios_set_axis_name
-
-SUBROUTINE xios_set_axis_standard_name(axis_hdl, ftype ,standard_name ,standard_name_size) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- CHARACTER(kind = C_CHAR), DIMENSION(*) :: standard_name
- INTEGER (kind = C_INT) :: standard_name_size
- END SUBROUTINE xios_set_axis_standard_name
-
-SUBROUTINE xios_set_axis_long_name(axis_hdl, ftype ,long_name ,long_name_size) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- CHARACTER(kind = C_CHAR), DIMENSION(*) :: long_name
- INTEGER (kind = C_INT) :: long_name_size
- END SUBROUTINE xios_set_axis_long_name
-
-SUBROUTINE xios_set_axis_unit(axis_hdl, ftype ,unit ,unit_size) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- CHARACTER(kind = C_CHAR), DIMENSION(*) :: unit
- INTEGER (kind = C_INT) :: unit_size
- END SUBROUTINE xios_set_axis_unit
-
-SUBROUTINE xios_set_axis_size(axis_hdl, ftype ,size) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- INTEGER (kind = C_INT) :: size
- END SUBROUTINE xios_set_axis_size
-
-SUBROUTINE xios_set_axis_zvalue(axis_hdl, ftype ,zvalue ,zvalue_extent1) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- REAL(kind = C_DOUBLE), DIMENSION(*) :: zvalue
- INTEGER (kind = C_INT) :: zvalue_extent1
- END SUBROUTINE xios_set_axis_zvalue
-
-SUBROUTINE xios_set_field_name(field_hdl, ftype ,name ,name_size) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- CHARACTER(kind = C_CHAR), DIMENSION(*) :: name
- INTEGER (kind = C_INT) :: name_size
- END SUBROUTINE xios_set_field_name
-
-SUBROUTINE xios_set_field_standard_name(field_hdl, ftype ,standard_name ,standard_name_size) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- CHARACTER(kind = C_CHAR), DIMENSION(*) :: standard_name
- INTEGER (kind = C_INT) :: standard_name_size
- END SUBROUTINE xios_set_field_standard_name
-
-SUBROUTINE xios_set_field_long_name(field_hdl, ftype ,long_name ,long_name_size) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- CHARACTER(kind = C_CHAR), DIMENSION(*) :: long_name
- INTEGER (kind = C_INT) :: long_name_size
- END SUBROUTINE xios_set_field_long_name
-
-SUBROUTINE xios_set_field_unit(field_hdl, ftype ,unit ,unit_size) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- CHARACTER(kind = C_CHAR), DIMENSION(*) :: unit
- INTEGER (kind = C_INT) :: unit_size
- END SUBROUTINE xios_set_field_unit
-
-SUBROUTINE xios_set_field_operation(field_hdl, ftype ,operation ,operation_size) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- CHARACTER(kind = C_CHAR), DIMENSION(*) :: operation
- INTEGER (kind = C_INT) :: operation_size
- END SUBROUTINE xios_set_field_operation
-
-SUBROUTINE xios_set_field_freq_op(field_hdl, ftype ,freq_op ,freq_op_size) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- CHARACTER(kind = C_CHAR), DIMENSION(*) :: freq_op
- INTEGER (kind = C_INT) :: freq_op_size
- END SUBROUTINE xios_set_field_freq_op
-
-SUBROUTINE xios_set_field_level(field_hdl, ftype ,level) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- INTEGER (kind = C_INT) :: level
- END SUBROUTINE xios_set_field_level
-
-SUBROUTINE xios_set_field_prec(field_hdl, ftype ,prec) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- INTEGER (kind = C_INT) :: prec
- END SUBROUTINE xios_set_field_prec
-
-SUBROUTINE xios_set_field_enabled(field_hdl, ftype ,enabled) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- LOGICAL (kind = C_BOOL) :: enabled
- END SUBROUTINE xios_set_field_enabled
-
-SUBROUTINE xios_set_field_domain_ref(field_hdl, ftype ,domain_ref ,domain_ref_size) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- CHARACTER(kind = C_CHAR), DIMENSION(*) :: domain_ref
- INTEGER (kind = C_INT) :: domain_ref_size
- END SUBROUTINE xios_set_field_domain_ref
-
-SUBROUTINE xios_set_field_axis_ref(field_hdl, ftype ,axis_ref ,axis_ref_size) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- CHARACTER(kind = C_CHAR), DIMENSION(*) :: axis_ref
- INTEGER (kind = C_INT) :: axis_ref_size
- END SUBROUTINE xios_set_field_axis_ref
-
-SUBROUTINE xios_set_field_grid_ref(field_hdl, ftype ,grid_ref ,grid_ref_size) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- CHARACTER(kind = C_CHAR), DIMENSION(*) :: grid_ref
- INTEGER (kind = C_INT) :: grid_ref_size
- END SUBROUTINE xios_set_field_grid_ref
-
-SUBROUTINE xios_set_field_zoom_ref(field_hdl, ftype ,zoom_ref ,zoom_ref_size) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- CHARACTER(kind = C_CHAR), DIMENSION(*) :: zoom_ref
- INTEGER (kind = C_INT) :: zoom_ref_size
- END SUBROUTINE xios_set_field_zoom_ref
-
-SUBROUTINE xios_set_field_field_ref(field_hdl, ftype ,field_ref ,field_ref_size) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- CHARACTER(kind = C_CHAR), DIMENSION(*) :: field_ref
- INTEGER (kind = C_INT) :: field_ref_size
- END SUBROUTINE xios_set_field_field_ref
-
-SUBROUTINE xios_set_context_calendar_type(context_hdl, ftype ,calendar_type ,calendar_type_size) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: context_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- CHARACTER(kind = C_CHAR), DIMENSION(*) :: calendar_type
- INTEGER (kind = C_INT) :: calendar_type_size
- END SUBROUTINE xios_set_context_calendar_type
-
-SUBROUTINE xios_set_context_start_date(context_hdl, ftype ,start_date ,start_date_size) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: context_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- CHARACTER(kind = C_CHAR), DIMENSION(*) :: start_date
- INTEGER (kind = C_INT) :: start_date_size
- END SUBROUTINE xios_set_context_start_date
-
-SUBROUTINE xios_set_domain_name(domain_hdl, ftype ,name ,name_size) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- CHARACTER(kind = C_CHAR), DIMENSION(*) :: name
- INTEGER (kind = C_INT) :: name_size
- END SUBROUTINE xios_set_domain_name
-
-SUBROUTINE xios_set_domain_standard_name(domain_hdl, ftype ,standard_name ,standard_name_size) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- CHARACTER(kind = C_CHAR), DIMENSION(*) :: standard_name
- INTEGER (kind = C_INT) :: standard_name_size
- END SUBROUTINE xios_set_domain_standard_name
-
-SUBROUTINE xios_set_domain_long_name(domain_hdl, ftype ,long_name ,long_name_size) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- CHARACTER(kind = C_CHAR), DIMENSION(*) :: long_name
- INTEGER (kind = C_INT) :: long_name_size
- END SUBROUTINE xios_set_domain_long_name
-
-SUBROUTINE xios_set_domain_ni_glo(domain_hdl, ftype ,ni_glo) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- INTEGER (kind = C_INT) :: ni_glo
- END SUBROUTINE xios_set_domain_ni_glo
-
-SUBROUTINE xios_set_domain_nj_glo(domain_hdl, ftype ,nj_glo) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- INTEGER (kind = C_INT) :: nj_glo
- END SUBROUTINE xios_set_domain_nj_glo
-
-SUBROUTINE xios_set_domain_ibegin(domain_hdl, ftype ,ibegin) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- INTEGER (kind = C_INT) :: ibegin
- END SUBROUTINE xios_set_domain_ibegin
-
-SUBROUTINE xios_set_domain_iend(domain_hdl, ftype ,iend) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- INTEGER (kind = C_INT) :: iend
- END SUBROUTINE xios_set_domain_iend
-
-SUBROUTINE xios_set_domain_ni(domain_hdl, ftype ,ni) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- INTEGER (kind = C_INT) :: ni
- END SUBROUTINE xios_set_domain_ni
-
-SUBROUTINE xios_set_domain_jbegin(domain_hdl, ftype ,jbegin) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- INTEGER (kind = C_INT) :: jbegin
- END SUBROUTINE xios_set_domain_jbegin
-
-SUBROUTINE xios_set_domain_jend(domain_hdl, ftype ,jend) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- INTEGER (kind = C_INT) :: jend
- END SUBROUTINE xios_set_domain_jend
-
-SUBROUTINE xios_set_domain_nj(domain_hdl, ftype ,nj) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- INTEGER (kind = C_INT) :: nj
- END SUBROUTINE xios_set_domain_nj
-
-SUBROUTINE xios_set_domain_mask(domain_hdl, ftype ,mask ,mask_extent1 ,mask_extent2) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- LOGICAL(kind = C_BOOL), DIMENSION(*) :: mask
- INTEGER (kind = C_INT) :: mask_extent1
- INTEGER (kind = C_INT) :: mask_extent2
- END SUBROUTINE xios_set_domain_mask
-
-SUBROUTINE xios_set_domain_data_dim(domain_hdl, ftype ,data_dim) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- INTEGER (kind = C_INT) :: data_dim
- END SUBROUTINE xios_set_domain_data_dim
-
-SUBROUTINE xios_set_domain_data_ni(domain_hdl, ftype ,data_ni) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- INTEGER (kind = C_INT) :: data_ni
- END SUBROUTINE xios_set_domain_data_ni
-
-SUBROUTINE xios_set_domain_data_nj(domain_hdl, ftype ,data_nj) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- INTEGER (kind = C_INT) :: data_nj
- END SUBROUTINE xios_set_domain_data_nj
-
-SUBROUTINE xios_set_domain_data_ibegin(domain_hdl, ftype ,data_ibegin) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- INTEGER (kind = C_INT) :: data_ibegin
- END SUBROUTINE xios_set_domain_data_ibegin
-
-SUBROUTINE xios_set_domain_data_jbegin(domain_hdl, ftype ,data_jbegin) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- INTEGER (kind = C_INT) :: data_jbegin
- END SUBROUTINE xios_set_domain_data_jbegin
-
-SUBROUTINE xios_set_domain_data_n_index(domain_hdl, ftype ,data_n_index) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- INTEGER (kind = C_INT) :: data_n_index
- END SUBROUTINE xios_set_domain_data_n_index
-
-SUBROUTINE xios_set_domain_data_i_index(domain_hdl, ftype ,data_i_index ,data_i_index_extent1) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- INTEGER(kind = C_INT), DIMENSION(*) :: data_i_index
- INTEGER (kind = C_INT) :: data_i_index_extent1
- END SUBROUTINE xios_set_domain_data_i_index
-
-SUBROUTINE xios_set_domain_data_j_index(domain_hdl, ftype ,data_j_index ,data_j_index_extent1) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- INTEGER(kind = C_INT), DIMENSION(*) :: data_j_index
- INTEGER (kind = C_INT) :: data_j_index_extent1
- END SUBROUTINE xios_set_domain_data_j_index
-
-SUBROUTINE xios_set_domain_lonvalue(domain_hdl, ftype ,lonvalue ,lonvalue_extent1) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- REAL(kind = C_DOUBLE), DIMENSION(*) :: lonvalue
- INTEGER (kind = C_INT) :: lonvalue_extent1
- END SUBROUTINE xios_set_domain_lonvalue
-
-SUBROUTINE xios_set_domain_latvalue(domain_hdl, ftype ,latvalue ,latvalue_extent1) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- REAL(kind = C_DOUBLE), DIMENSION(*) :: latvalue
- INTEGER (kind = C_INT) :: latvalue_extent1
- END SUBROUTINE xios_set_domain_latvalue
-
-SUBROUTINE xios_set_file_name(file_hdl, ftype ,name ,name_size) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- CHARACTER(kind = C_CHAR), DIMENSION(*) :: name
- INTEGER (kind = C_INT) :: name_size
- END SUBROUTINE xios_set_file_name
-
-SUBROUTINE xios_set_file_description(file_hdl, ftype ,description ,description_size) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- CHARACTER(kind = C_CHAR), DIMENSION(*) :: description
- INTEGER (kind = C_INT) :: description_size
- END SUBROUTINE xios_set_file_description
-
-SUBROUTINE xios_set_file_output_freq(file_hdl, ftype ,output_freq ,output_freq_size) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- CHARACTER(kind = C_CHAR), DIMENSION(*) :: output_freq
- INTEGER (kind = C_INT) :: output_freq_size
- END SUBROUTINE xios_set_file_output_freq
-
-SUBROUTINE xios_set_file_output_level(file_hdl, ftype ,output_level) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- INTEGER (kind = C_INT) :: output_level
- END SUBROUTINE xios_set_file_output_level
-
-SUBROUTINE xios_set_file_enabled(file_hdl, ftype ,enabled) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- LOGICAL (kind = C_BOOL) :: enabled
- END SUBROUTINE xios_set_file_enabled
-
-SUBROUTINE xios_set_grid_name(grid_hdl, ftype ,name ,name_size) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: grid_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- CHARACTER(kind = C_CHAR), DIMENSION(*) :: name
- INTEGER (kind = C_INT) :: name_size
- END SUBROUTINE xios_set_grid_name
-
-SUBROUTINE xios_set_grid_description(grid_hdl, ftype ,description ,description_size) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: grid_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- CHARACTER(kind = C_CHAR), DIMENSION(*) :: description
- INTEGER (kind = C_INT) :: description_size
- END SUBROUTINE xios_set_grid_description
-
-SUBROUTINE xios_set_grid_domain_ref(grid_hdl, ftype ,domain_ref ,domain_ref_size) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: grid_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- CHARACTER(kind = C_CHAR), DIMENSION(*) :: domain_ref
- INTEGER (kind = C_INT) :: domain_ref_size
- END SUBROUTINE xios_set_grid_domain_ref
-
-SUBROUTINE xios_set_grid_axis_ref(grid_hdl, ftype ,axis_ref ,axis_ref_size) BIND(C)
- USE ISO_C_BINDING
- INTEGER (kind = C_INTPTR_T), VALUE :: grid_hdl
- INTEGER (kind = C_INT), VALUE :: ftype
- CHARACTER(kind = C_CHAR), DIMENSION(*) :: axis_ref
- INTEGER (kind = C_INT) :: axis_ref_size
- END SUBROUTINE xios_set_grid_axis_ref
-
-   END INTERFACE
-   CONTAINS ! Fonctions disponibles pour les utilisateurs.
-   SUBROUTINE handle_create(ret, dtype, idt)
-      TYPE(XHandle), INTENT(OUT) :: ret
-      INTEGER, INTENT(IN) :: dtype
-      CHARACTER(len = *), INTENT(IN) :: idt
-      CALL xios_handle_create(ret%daddr, dtype, idt, len(idt))
-   END SUBROUTINE handle_create
-   SUBROUTINE set_timestep(timestep)
-      TYPE(XDuration), INTENT(IN):: timestep
-      CALL xios_set_timestep(timestep%year, timestep%month , timestep%day, &
-                             timestep%hour, timestep%minute, timestep%second)
-   END SUBROUTINE set_timestep
-   SUBROUTINE update_calendar(step)
-      INTEGER, INTENT(IN):: step
-      IF (step < 1) THEN
-         PRINT *, "L'argument 'step' ne peut Ãªtre nÃ©gatif ou nul"
-         STOP
-      END IF
-      CALL xios_update_calendar(step)
-   END SUBROUTINE update_calendar
-   SUBROUTINE xml_tree_add(parent_hdl, parent_type, child_hdl, child_type, child_id)
-      TYPE(XHandle), INTENT(IN) :: parent_hdl
-      TYPE(XHandle), INTENT(OUT) :: child_hdl
-      INTEGER, INTENT(IN) :: child_type, parent_type
-      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: child_id
-      child_hdl = NULLHANDLE
-      IF (PRESENT(child_id)) THEN
-         CALL xios_xml_tree_add(parent_hdl%daddr, parent_type, child_hdl%daddr, child_type, child_id, len(child_id))
-      ELSE
-         CALL xios_xml_tree_add(parent_hdl%daddr, parent_type, child_hdl%daddr, child_type, "NONE", -1)
-      END IF
-   END SUBROUTINE xml_tree_add
-   SUBROUTINE xml_tree_show(filename)
-      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: filename
-      IF (PRESENT(filename)) THEN
-         CALL xios_xml_tree_show(filename, len(filename))
-      ELSE
-         CALL xios_xml_tree_show("NONE", -1)
-      END IF
-   END SUBROUTINE xml_tree_show
-   SUBROUTINE xml_parse_file(filename)
-      CHARACTER(len = *), INTENT(IN) :: filename
-      CALL xios_xml_Parse_File(filename, len(filename))
-   END SUBROUTINE xml_Parse_File
-   SUBROUTINE xml_parse_string(xmlcontent)
-      CHARACTER(len = *), INTENT(IN) :: xmlcontent
-      CALL xios_xml_Parse_String(xmlcontent, len(xmlcontent))
-   END SUBROUTINE xml_Parse_String
-   SUBROUTINE context_set_current(context, withswap)
-      TYPE(XHandle), INTENT(IN) :: context
-      LOGICAL (kind = 1), OPTIONAL, INTENT(IN) :: withswap
-      LOGICAL (kind = 1) :: wswap
-      IF (PRESENT(withswap)) THEN
-         wswap = withswap
-      ELSE
-         wswap = .FALSE.
-      END IF
-      CALL xios_context_set_current(context%daddr, wswap)
-   END SUBROUTINE context_set_current
-   SUBROUTINE context_create(context_hdl, context_id, calendar_type, init_date)
-      TYPE(XHandle), INTENT(OUT) :: context_hdl
-      CHARACTER(len = *), INTENT(IN) :: context_id
-      INTEGER, INTENT(IN) :: calendar_type
-      TYPE(XDate), INTENT(IN), OPTIONAL :: init_date
-      IF (PRESENT(init_date)) THEN
-         CALL xios_context_create(context_hdl%daddr, context_id, len(context_id), calendar_type, &
-                                  init_date%year, init_date%month, init_date%day, &
-                                  init_date%hour, init_date%minute, init_date%second)
-      ELSE
-         CALL xios_context_create(context_hdl%daddr, context_id, len(context_id), calendar_type, &
-                                 0, 1, 1, 0, 0, 0)
-      END IF
-   END SUBROUTINE context_create
-   SUBROUTINE dtreatment_start(context_hdl, filetype)
-      TYPE(XHandle), INTENT(IN), VALUE :: context_hdl
-      INTEGER, INTENT(IN), OPTIONAL :: filetype
-      INTEGER :: filetype_
-      IF (PRESENT(filetype)) THEN
-         filetype_ = filetype
-      ELSE
-         filetype_ = NETCDF4
-      END IF
-         CALL context_set_current(context_hdl)
-         CALL xios_dtreatment_start(context_hdl%daddr, filetype_)
-   END SUBROUTINE dtreatment_start
-   SUBROUTINE dtreatment_end(context_hdl)
-      TYPE(XHandle), INTENT(IN), VALUE :: context_hdl
-      CALL context_set_current(context_hdl)
-      CALL xios_dtreatment_end()
-   END SUBROUTINE dtreatment_end
-   SUBROUTINE write_data (fieldid, &
-                          data1d_k8, data2d_k8, data3d_k8)
-      CHARACTER(len = *), INTENT(IN) :: fieldid
-      REAL(kind = 8), DIMENSION(*), OPTIONAL, INTENT(IN) :: data1d_k8(:), data2d_k8(:,:), data3d_k8(:,:,:)
-      IF((.NOT. PRESENT(data1d_k8)) .AND. &
-         (.NOT. PRESENT(data2d_k8)) .AND. &
-         (.NOT. PRESENT(data3d_k8))) THEN
-         PRINT *, "(F2003 interface) Veuillez spÃÂ©cifier des donnÃ©es Ã  Ã©crire !"
-         STOP
-      END IF
-      IF (PRESENT (data1d_k8)) THEN
-         CALL xios_write_data(fieldid, len(fieldid), data1d_k8, &
-                              size(data1d_k8, 1), -1, -1)
-      ELSE IF (PRESENT (data2d_k8)) THEN
-         CALL xios_write_data(fieldid, len(fieldid), data2d_k8, &
-                              size(data2d_k8, 1), size(data2d_k8, 2), -1)
-      ELSE IF (PRESENT (data3d_k8)) THEN
-         CALL xios_write_data(fieldid, len(fieldid), data3d_k8, &
-                              size(data3d_k8, 1), size(data3d_k8, 2), size(data3d_k8, 3))
-      END IF
-   END SUBROUTINE
-   SUBROUTINE set_axis_attributes( axis_hdl, ftype &
-,name_ &
-,standard_name_ &
-,long_name_ &
-,unit_ &
-,size_ &
-,zvalue_ &
-   )
-      TYPE(XHandle) :: axis_hdl
-      INTEGER (kind = C_INT) :: ftype
-CHARACTER(len = *), OPTIONAL, INTENT(IN) :: name_
-CHARACTER(len = *), OPTIONAL, INTENT(IN) :: standard_name_
-CHARACTER(len = *), OPTIONAL, INTENT(IN) :: long_name_
-CHARACTER(len = *), OPTIONAL, INTENT(IN) :: unit_
-INTEGER, OPTIONAL, INTENT(IN) :: size_
-REAL(kind = 8), dimension(*), OPTIONAL, INTENT(IN) :: zvalue_(:)
-IF (PRESENT(name_)) THEN
- CALL xios_set_axis_name(axis_hdl%daddr, ftype, name_, len(name_))
- END IF
-
-IF (PRESENT(standard_name_)) THEN
- CALL xios_set_axis_standard_name(axis_hdl%daddr, ftype, standard_name_, len(standard_name_))
- END IF
-
-IF (PRESENT(long_name_)) THEN
- CALL xios_set_axis_long_name(axis_hdl%daddr, ftype, long_name_, len(long_name_))
- END IF
-
-IF (PRESENT(unit_)) THEN
- CALL xios_set_axis_unit(axis_hdl%daddr, ftype, unit_, len(unit_))
- END IF
-
-IF (PRESENT(size_)) THEN
- CALL xios_set_axis_size(axis_hdl%daddr, ftype, size_)
- END IF
-
-IF (PRESENT(zvalue_)) THEN
- CALL xios_set_axis_zvalue(axis_hdl%daddr, ftype, zvalue_, size(zvalue_, 1))
- END IF
-
-   END SUBROUTINE set_axis_attributes
-   SUBROUTINE set_field_attributes( field_hdl, ftype &
-,name_ &
-,standard_name_ &
-,long_name_ &
-,unit_ &
-,operation_ &
-,freq_op_ &
-,level_ &
-,prec_ &
-,enabled_ &
-,domain_ref_ &
-,axis_ref_ &
-,grid_ref_ &
-,zoom_ref_ &
-,field_ref_ &
-   )
-      TYPE(XHandle) :: field_hdl
-      INTEGER (kind = C_INT) :: ftype
-CHARACTER(len = *), OPTIONAL, INTENT(IN) :: name_
-CHARACTER(len = *), OPTIONAL, INTENT(IN) :: standard_name_
-CHARACTER(len = *), OPTIONAL, INTENT(IN) :: long_name_
-CHARACTER(len = *), OPTIONAL, INTENT(IN) :: unit_
-CHARACTER(len = *), OPTIONAL, INTENT(IN) :: operation_
-CHARACTER(len = *), OPTIONAL, INTENT(IN) :: freq_op_
-INTEGER, OPTIONAL, INTENT(IN) :: level_
-INTEGER, OPTIONAL, INTENT(IN) :: prec_
-LOGICAL(kind = 1), OPTIONAL, INTENT(IN) :: enabled_
-CHARACTER(len = *), OPTIONAL, INTENT(IN) :: domain_ref_
-CHARACTER(len = *), OPTIONAL, INTENT(IN) :: axis_ref_
-CHARACTER(len = *), OPTIONAL, INTENT(IN) :: grid_ref_
-CHARACTER(len = *), OPTIONAL, INTENT(IN) :: zoom_ref_
-CHARACTER(len = *), OPTIONAL, INTENT(IN) :: field_ref_
-IF (PRESENT(name_)) THEN
- CALL xios_set_field_name(field_hdl%daddr, ftype, name_, len(name_))
- END IF
-
-IF (PRESENT(standard_name_)) THEN
- CALL xios_set_field_standard_name(field_hdl%daddr, ftype, standard_name_, len(standard_name_))
- END IF
-
-IF (PRESENT(long_name_)) THEN
- CALL xios_set_field_long_name(field_hdl%daddr, ftype, long_name_, len(long_name_))
- END IF
-
-IF (PRESENT(unit_)) THEN
- CALL xios_set_field_unit(field_hdl%daddr, ftype, unit_, len(unit_))
- END IF
-
-IF (PRESENT(operation_)) THEN
- CALL xios_set_field_operation(field_hdl%daddr, ftype, operation_, len(operation_))
- END IF
-
-IF (PRESENT(freq_op_)) THEN
- CALL xios_set_field_freq_op(field_hdl%daddr, ftype, freq_op_, len(freq_op_))
- END IF
-
-IF (PRESENT(level_)) THEN
- CALL xios_set_field_level(field_hdl%daddr, ftype, level_)
- END IF
-
-IF (PRESENT(prec_)) THEN
- CALL xios_set_field_prec(field_hdl%daddr, ftype, prec_)
- END IF
-
-IF (PRESENT(enabled_)) THEN
- CALL xios_set_field_enabled(field_hdl%daddr, ftype, enabled_)
- END IF
-
-IF (PRESENT(domain_ref_)) THEN
- CALL xios_set_field_domain_ref(field_hdl%daddr, ftype, domain_ref_, len(domain_ref_))
- END IF
-
-IF (PRESENT(axis_ref_)) THEN
- CALL xios_set_field_axis_ref(field_hdl%daddr, ftype, axis_ref_, len(axis_ref_))
- END IF
-
-IF (PRESENT(grid_ref_)) THEN
- CALL xios_set_field_grid_ref(field_hdl%daddr, ftype, grid_ref_, len(grid_ref_))
- END IF
-
-IF (PRESENT(zoom_ref_)) THEN
- CALL xios_set_field_zoom_ref(field_hdl%daddr, ftype, zoom_ref_, len(zoom_ref_))
- END IF
-
-IF (PRESENT(field_ref_)) THEN
- CALL xios_set_field_field_ref(field_hdl%daddr, ftype, field_ref_, len(field_ref_))
- END IF
-
-   END SUBROUTINE set_field_attributes
-   SUBROUTINE set_context_attributes( context_hdl, ftype &
-,calendar_type_ &
-,start_date_ &
-   )
-      TYPE(XHandle) :: context_hdl
-      INTEGER (kind = C_INT) :: ftype
-CHARACTER(len = *), OPTIONAL, INTENT(IN) :: calendar_type_
-CHARACTER(len = *), OPTIONAL, INTENT(IN) :: start_date_
-IF (PRESENT(calendar_type_)) THEN
- CALL xios_set_context_calendar_type(context_hdl%daddr, ftype, calendar_type_, len(calendar_type_))
- END IF
-
-IF (PRESENT(start_date_)) THEN
- CALL xios_set_context_start_date(context_hdl%daddr, ftype, start_date_, len(start_date_))
- END IF
-
-   END SUBROUTINE set_context_attributes
-   SUBROUTINE set_domain_attributes( domain_hdl, ftype &
-,name_ &
-,standard_name_ &
-,long_name_ &
-,ni_glo_ &
-,nj_glo_ &
-,ibegin_ &
-,iend_ &
-,ni_ &
-,jbegin_ &
-,jend_ &
-,nj_ &
-,mask_ &
-,data_dim_ &
-,data_ni_ &
-,data_nj_ &
-,data_ibegin_ &
-,data_jbegin_ &
-,data_n_index_ &
-,data_i_index_ &
-,data_j_index_ &
-,lonvalue_ &
-,latvalue_ &
-   )
-      TYPE(XHandle) :: domain_hdl
-      INTEGER (kind = C_INT) :: ftype
-CHARACTER(len = *), OPTIONAL, INTENT(IN) :: name_
-CHARACTER(len = *), OPTIONAL, INTENT(IN) :: standard_name_
-CHARACTER(len = *), OPTIONAL, INTENT(IN) :: long_name_
-INTEGER, OPTIONAL, INTENT(IN) :: ni_glo_
-INTEGER, OPTIONAL, INTENT(IN) :: nj_glo_
-INTEGER, OPTIONAL, INTENT(IN) :: ibegin_
-INTEGER, OPTIONAL, INTENT(IN) :: iend_
-INTEGER, OPTIONAL, INTENT(IN) :: ni_
-INTEGER, OPTIONAL, INTENT(IN) :: jbegin_
-INTEGER, OPTIONAL, INTENT(IN) :: jend_
-INTEGER, OPTIONAL, INTENT(IN) :: nj_
-LOGICAL(kind = 1), dimension(*), OPTIONAL, INTENT(IN) :: mask_(:,:)
-INTEGER, OPTIONAL, INTENT(IN) :: data_dim_
-INTEGER, OPTIONAL, INTENT(IN) :: data_ni_
-INTEGER, OPTIONAL, INTENT(IN) :: data_nj_
-INTEGER, OPTIONAL, INTENT(IN) :: data_ibegin_
-INTEGER, OPTIONAL, INTENT(IN) :: data_jbegin_
-INTEGER, OPTIONAL, INTENT(IN) :: data_n_index_
-INTEGER, dimension(*), OPTIONAL, INTENT(IN) :: data_i_index_(:)
-INTEGER, dimension(*), OPTIONAL, INTENT(IN) :: data_j_index_(:)
-REAL(kind = 8), dimension(*), OPTIONAL, INTENT(IN) :: lonvalue_(:)
-REAL(kind = 8), dimension(*), OPTIONAL, INTENT(IN) :: latvalue_(:)
-IF (PRESENT(name_)) THEN
- CALL xios_set_domain_name(domain_hdl%daddr, ftype, name_, len(name_))
- END IF
-
-IF (PRESENT(standard_name_)) THEN
- CALL xios_set_domain_standard_name(domain_hdl%daddr, ftype, standard_name_, len(standard_name_))
- END IF
-
-IF (PRESENT(long_name_)) THEN
- CALL xios_set_domain_long_name(domain_hdl%daddr, ftype, long_name_, len(long_name_))
- END IF
-
-IF (PRESENT(ni_glo_)) THEN
- CALL xios_set_domain_ni_glo(domain_hdl%daddr, ftype, ni_glo_)
- END IF
-
-IF (PRESENT(nj_glo_)) THEN
- CALL xios_set_domain_nj_glo(domain_hdl%daddr, ftype, nj_glo_)
- END IF
-
-IF (PRESENT(ibegin_)) THEN
- CALL xios_set_domain_ibegin(domain_hdl%daddr, ftype, ibegin_)
- END IF
-
-IF (PRESENT(iend_)) THEN
- CALL xios_set_domain_iend(domain_hdl%daddr, ftype, iend_)
- END IF
-
-IF (PRESENT(ni_)) THEN
- CALL xios_set_domain_ni(domain_hdl%daddr, ftype, ni_)
- END IF
-
-IF (PRESENT(jbegin_)) THEN
- CALL xios_set_domain_jbegin(domain_hdl%daddr, ftype, jbegin_)
- END IF
-
-IF (PRESENT(jend_)) THEN
- CALL xios_set_domain_jend(domain_hdl%daddr, ftype, jend_)
- END IF
-
-IF (PRESENT(nj_)) THEN
- CALL xios_set_domain_nj(domain_hdl%daddr, ftype, nj_)
- END IF
-
-IF (PRESENT(mask_)) THEN
- CALL xios_set_domain_mask(domain_hdl%daddr, ftype, mask_, size(mask_, 1), size(mask_, 2))
- END IF
-
-IF (PRESENT(data_dim_)) THEN
- CALL xios_set_domain_data_dim(domain_hdl%daddr, ftype, data_dim_)
- END IF
-
-IF (PRESENT(data_ni_)) THEN
- CALL xios_set_domain_data_ni(domain_hdl%daddr, ftype, data_ni_)
- END IF
-
-IF (PRESENT(data_nj_)) THEN
- CALL xios_set_domain_data_nj(domain_hdl%daddr, ftype, data_nj_)
- END IF
-
-IF (PRESENT(data_ibegin_)) THEN
- CALL xios_set_domain_data_ibegin(domain_hdl%daddr, ftype, data_ibegin_)
- END IF
-
-IF (PRESENT(data_jbegin_)) THEN
- CALL xios_set_domain_data_jbegin(domain_hdl%daddr, ftype, data_jbegin_)
- END IF
-
-IF (PRESENT(data_n_index_)) THEN
- CALL xios_set_domain_data_n_index(domain_hdl%daddr, ftype, data_n_index_)
- END IF
-
-IF (PRESENT(data_i_index_)) THEN
- CALL xios_set_domain_data_i_index(domain_hdl%daddr, ftype, data_i_index_, size(data_i_index_, 1))
- END IF
-
-IF (PRESENT(data_j_index_)) THEN
- CALL xios_set_domain_data_j_index(domain_hdl%daddr, ftype, data_j_index_, size(data_j_index_, 1))
- END IF
-
-IF (PRESENT(lonvalue_)) THEN
- CALL xios_set_domain_lonvalue(domain_hdl%daddr, ftype, lonvalue_, size(lonvalue_, 1))
- END IF
-
-IF (PRESENT(latvalue_)) THEN
- CALL xios_set_domain_latvalue(domain_hdl%daddr, ftype, latvalue_, size(latvalue_, 1))
- END IF
-
-   END SUBROUTINE set_domain_attributes
-   SUBROUTINE set_grid_attributes( grid_hdl, ftype &
-,name_ &
-,description_ &
-,domain_ref_ &
-,axis_ref_ &
-   )
-      TYPE(XHandle) :: grid_hdl
-      INTEGER (kind = C_INT) :: ftype
-CHARACTER(len = *), OPTIONAL, INTENT(IN) :: name_
-CHARACTER(len = *), OPTIONAL, INTENT(IN) :: description_
-CHARACTER(len = *), OPTIONAL, INTENT(IN) :: domain_ref_
-CHARACTER(len = *), OPTIONAL, INTENT(IN) :: axis_ref_
-IF (PRESENT(name_)) THEN
- CALL xios_set_grid_name(grid_hdl%daddr, ftype, name_, len(name_))
- END IF
-
-IF (PRESENT(description_)) THEN
- CALL xios_set_grid_description(grid_hdl%daddr, ftype, description_, len(description_))
- END IF
-
-IF (PRESENT(domain_ref_)) THEN
- CALL xios_set_grid_domain_ref(grid_hdl%daddr, ftype, domain_ref_, len(domain_ref_))
- END IF
-
-IF (PRESENT(axis_ref_)) THEN
- CALL xios_set_grid_axis_ref(grid_hdl%daddr, ftype, axis_ref_, len(axis_ref_))
- END IF
-
-   END SUBROUTINE set_grid_attributes
-   SUBROUTINE set_file_attributes( file_hdl, ftype &
-,name_ &
-,description_ &
-,output_freq_ &
-,output_level_ &
-,enabled_ &
-   )
-      TYPE(XHandle) :: file_hdl
-      INTEGER (kind = C_INT) :: ftype
-CHARACTER(len = *), OPTIONAL, INTENT(IN) :: name_
-CHARACTER(len = *), OPTIONAL, INTENT(IN) :: description_
-CHARACTER(len = *), OPTIONAL, INTENT(IN) :: output_freq_
-INTEGER, OPTIONAL, INTENT(IN) :: output_level_
-LOGICAL(kind = 1), OPTIONAL, INTENT(IN) :: enabled_
-IF (PRESENT(name_)) THEN
- CALL xios_set_file_name(file_hdl%daddr, ftype, name_, len(name_))
- END IF
-
-IF (PRESENT(description_)) THEN
- CALL xios_set_file_description(file_hdl%daddr, ftype, description_, len(description_))
- END IF
-
-IF (PRESENT(output_freq_)) THEN
- CALL xios_set_file_output_freq(file_hdl%daddr, ftype, output_freq_, len(output_freq_))
- END IF
-
-IF (PRESENT(output_level_)) THEN
- CALL xios_set_file_output_level(file_hdl%daddr, ftype, output_level_)
- END IF
-
-IF (PRESENT(enabled_)) THEN
- CALL xios_set_file_enabled(file_hdl%daddr, ftype, enabled_)
- END IF
-
-   END SUBROUTINE set_file_attributes
-END MODULE IXMLIOSERVER
Index: XMLIO_V2/dev/dev_rv/src/xmlio/iface/interface.cpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src/xmlio/iface/interface.cpp	(revision 154)
+++ 	(revision )
@@ -1,1838 +1,0 @@
-
-
-
-
-#include "../xmlioserver.hpp"
-
-#include "attribute_template_impl.hpp"
-#include "object_template_impl.hpp"
-#include "group_template_impl.hpp"
-
-
-extern "C"
-{
-
-
-typedef xmlioserver::tree::CAxis caxis;
-typedef xmlioserver::tree::CField cfield;
-typedef xmlioserver::tree::CDomain cdomain;
-typedef xmlioserver::tree::CGrid cgrid;
-typedef xmlioserver::tree::CFile cfile;
-typedef xmlioserver::tree::CContext ccontext;
-
-typedef xmlioserver::tree::CAxisGroup caxisgroup;
-typedef xmlioserver::tree::CFieldGroup cfieldgroup;
-typedef xmlioserver::tree::CDomainGroup cdomaingroup;
-typedef xmlioserver::tree::CGridGroup cgridgroup;
-typedef xmlioserver::tree::CFileGroup cfilegroup;
-typedef xmlioserver::tree::CContextGroup ccontextgroup;
-
-
-typedef long int XInt, XSize;
-typedef bool XBool;
-typedef void * XPtr;
-typedef char * XString;
-
-typedef enum
-{
-   NOTYPE = 0,
-   DTREATMENT , DATE, CALENDAR, ECONTEXT,
-   EAXIS, EDOMAIN, EFIELD, EFILE, EGRID,
-   GAXIS, GDOMAIN, GFIELD, GFILE, GGRID
-} XDType;
-
-typedef enum
-{
-   NETCDF4 = 0
-} XFileType;
-
-typedef enum
-{ D360 = 0 , ALLLEAP, NOLEAP, JULIAN, GREGORIAN } XCalendarType ;
-
- void xios_set_axis_name (void * axis_hdl, int ftype , const char * name , const int * name_size)
- {
- 
- StdString name_valtemp; 
- StdSize d, f = 0; 
- if (*name_size != -1) 
- { 
- name_valtemp.append (name, *name_size); 
- d = name_valtemp.find_first_not_of(' '); 
- f = name_valtemp.find_last_not_of (' '); 
- } 
- StdString name_val = (*name_size != -1) ? name_valtemp.substr(d, f-d+1) : "" ; 
- 
- if (axis_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- caxis * axis_hdl_ = (caxis *) axis_hdl; 
- axis_hdl_->name.setValue(name_val); 
- }
- else
- {
- caxisgroup * axis_hdl_
- = (caxisgroup *) axis_hdl; 
- axis_hdl_->name.setValue(name_val); 
- }
- }
- }
- 
-
-
- void xios_set_axis_standard_name (void * axis_hdl, int ftype , const char * standard_name , const int * standard_name_size)
- {
- 
- StdString standard_name_valtemp; 
- StdSize d, f = 0; 
- if (*standard_name_size != -1) 
- { 
- standard_name_valtemp.append (standard_name, *standard_name_size); 
- d = standard_name_valtemp.find_first_not_of(' '); 
- f = standard_name_valtemp.find_last_not_of (' '); 
- } 
- StdString standard_name_val = (*standard_name_size != -1) ? standard_name_valtemp.substr(d, f-d+1) : "" ; 
- 
- if (axis_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- caxis * axis_hdl_ = (caxis *) axis_hdl; 
- axis_hdl_->standard_name.setValue(standard_name_val); 
- }
- else
- {
- caxisgroup * axis_hdl_
- = (caxisgroup *) axis_hdl; 
- axis_hdl_->standard_name.setValue(standard_name_val); 
- }
- }
- }
- 
-
-
- void xios_set_axis_long_name (void * axis_hdl, int ftype , const char * long_name , const int * long_name_size)
- {
- 
- StdString long_name_valtemp; 
- StdSize d, f = 0; 
- if (*long_name_size != -1) 
- { 
- long_name_valtemp.append (long_name, *long_name_size); 
- d = long_name_valtemp.find_first_not_of(' '); 
- f = long_name_valtemp.find_last_not_of (' '); 
- } 
- StdString long_name_val = (*long_name_size != -1) ? long_name_valtemp.substr(d, f-d+1) : "" ; 
- 
- if (axis_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- caxis * axis_hdl_ = (caxis *) axis_hdl; 
- axis_hdl_->long_name.setValue(long_name_val); 
- }
- else
- {
- caxisgroup * axis_hdl_
- = (caxisgroup *) axis_hdl; 
- axis_hdl_->long_name.setValue(long_name_val); 
- }
- }
- }
- 
-
-
- void xios_set_axis_unit (void * axis_hdl, int ftype , const char * unit , const int * unit_size)
- {
- 
- StdString unit_valtemp; 
- StdSize d, f = 0; 
- if (*unit_size != -1) 
- { 
- unit_valtemp.append (unit, *unit_size); 
- d = unit_valtemp.find_first_not_of(' '); 
- f = unit_valtemp.find_last_not_of (' '); 
- } 
- StdString unit_val = (*unit_size != -1) ? unit_valtemp.substr(d, f-d+1) : "" ; 
- 
- if (axis_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- caxis * axis_hdl_ = (caxis *) axis_hdl; 
- axis_hdl_->unit.setValue(unit_val); 
- }
- else
- {
- caxisgroup * axis_hdl_
- = (caxisgroup *) axis_hdl; 
- axis_hdl_->unit.setValue(unit_val); 
- }
- }
- }
- 
-
-
- void xios_set_axis_size (void * axis_hdl, int ftype , const int * size)
- {
- int size_val = *size; 
- if (axis_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- caxis * axis_hdl_ = (caxis *) axis_hdl; 
- axis_hdl_->size.setValue(size_val); 
- }
- else
- {
- caxisgroup * axis_hdl_
- = (caxisgroup *) axis_hdl; 
- axis_hdl_->size.setValue(size_val); 
- }
- }
- }
- 
-
-
- void xios_set_axis_zvalue (void * axis_hdl, int ftype , const double * zvalue , const int * zvalue_extent1)
- {
- int zvalue_extent1_val = *zvalue_extent1; 
- boost::shared_ptr<CArray<double, 1> > zvalue_val 
- (new CArray<double, 1>(boost::extents [zvalue_extent1_val])); 
- std::copy(zvalue, &(zvalue[zvalue_val->num_elements()]), zvalue_val->data()); 
- 
- if (axis_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- caxis * axis_hdl_ = (caxis *) axis_hdl; 
- axis_hdl_->zvalue.setValue(zvalue_val); 
- }
- else
- {
- caxisgroup * axis_hdl_
- = (caxisgroup *) axis_hdl; 
- axis_hdl_->zvalue.setValue(zvalue_val); 
- }
- }
- }
- 
-
-
- void xios_set_field_name (void * field_hdl, int ftype , const char * name , const int * name_size)
- {
- 
- StdString name_valtemp; 
- StdSize d, f = 0; 
- if (*name_size != -1) 
- { 
- name_valtemp.append (name, *name_size); 
- d = name_valtemp.find_first_not_of(' '); 
- f = name_valtemp.find_last_not_of (' '); 
- } 
- StdString name_val = (*name_size != -1) ? name_valtemp.substr(d, f-d+1) : "" ; 
- 
- if (field_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cfield * field_hdl_ = (cfield *) field_hdl; 
- field_hdl_->name.setValue(name_val); 
- }
- else
- {
- cfieldgroup * field_hdl_
- = (cfieldgroup *) field_hdl; 
- field_hdl_->name.setValue(name_val); 
- }
- }
- }
- 
-
-
- void xios_set_field_standard_name (void * field_hdl, int ftype , const char * standard_name , const int * standard_name_size)
- {
- 
- StdString standard_name_valtemp; 
- StdSize d, f = 0; 
- if (*standard_name_size != -1) 
- { 
- standard_name_valtemp.append (standard_name, *standard_name_size); 
- d = standard_name_valtemp.find_first_not_of(' '); 
- f = standard_name_valtemp.find_last_not_of (' '); 
- } 
- StdString standard_name_val = (*standard_name_size != -1) ? standard_name_valtemp.substr(d, f-d+1) : "" ; 
- 
- if (field_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cfield * field_hdl_ = (cfield *) field_hdl; 
- field_hdl_->standard_name.setValue(standard_name_val); 
- }
- else
- {
- cfieldgroup * field_hdl_
- = (cfieldgroup *) field_hdl; 
- field_hdl_->standard_name.setValue(standard_name_val); 
- }
- }
- }
- 
-
-
- void xios_set_field_long_name (void * field_hdl, int ftype , const char * long_name , const int * long_name_size)
- {
- 
- StdString long_name_valtemp; 
- StdSize d, f = 0; 
- if (*long_name_size != -1) 
- { 
- long_name_valtemp.append (long_name, *long_name_size); 
- d = long_name_valtemp.find_first_not_of(' '); 
- f = long_name_valtemp.find_last_not_of (' '); 
- } 
- StdString long_name_val = (*long_name_size != -1) ? long_name_valtemp.substr(d, f-d+1) : "" ; 
- 
- if (field_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cfield * field_hdl_ = (cfield *) field_hdl; 
- field_hdl_->long_name.setValue(long_name_val); 
- }
- else
- {
- cfieldgroup * field_hdl_
- = (cfieldgroup *) field_hdl; 
- field_hdl_->long_name.setValue(long_name_val); 
- }
- }
- }
- 
-
-
- void xios_set_field_unit (void * field_hdl, int ftype , const char * unit , const int * unit_size)
- {
- 
- StdString unit_valtemp; 
- StdSize d, f = 0; 
- if (*unit_size != -1) 
- { 
- unit_valtemp.append (unit, *unit_size); 
- d = unit_valtemp.find_first_not_of(' '); 
- f = unit_valtemp.find_last_not_of (' '); 
- } 
- StdString unit_val = (*unit_size != -1) ? unit_valtemp.substr(d, f-d+1) : "" ; 
- 
- if (field_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cfield * field_hdl_ = (cfield *) field_hdl; 
- field_hdl_->unit.setValue(unit_val); 
- }
- else
- {
- cfieldgroup * field_hdl_
- = (cfieldgroup *) field_hdl; 
- field_hdl_->unit.setValue(unit_val); 
- }
- }
- }
- 
-
-
- void xios_set_field_operation (void * field_hdl, int ftype , const char * operation , const int * operation_size)
- {
- 
- StdString operation_valtemp; 
- StdSize d, f = 0; 
- if (*operation_size != -1) 
- { 
- operation_valtemp.append (operation, *operation_size); 
- d = operation_valtemp.find_first_not_of(' '); 
- f = operation_valtemp.find_last_not_of (' '); 
- } 
- StdString operation_val = (*operation_size != -1) ? operation_valtemp.substr(d, f-d+1) : "" ; 
- 
- if (field_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cfield * field_hdl_ = (cfield *) field_hdl; 
- field_hdl_->operation.setValue(operation_val); 
- }
- else
- {
- cfieldgroup * field_hdl_
- = (cfieldgroup *) field_hdl; 
- field_hdl_->operation.setValue(operation_val); 
- }
- }
- }
- 
-
-
- void xios_set_field_freq_op (void * field_hdl, int ftype , const char * freq_op , const int * freq_op_size)
- {
- 
- StdString freq_op_valtemp; 
- StdSize d, f = 0; 
- if (*freq_op_size != -1) 
- { 
- freq_op_valtemp.append (freq_op, *freq_op_size); 
- d = freq_op_valtemp.find_first_not_of(' '); 
- f = freq_op_valtemp.find_last_not_of (' '); 
- } 
- StdString freq_op_val = (*freq_op_size != -1) ? freq_op_valtemp.substr(d, f-d+1) : "" ; 
- 
- if (field_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cfield * field_hdl_ = (cfield *) field_hdl; 
- field_hdl_->freq_op.setValue(freq_op_val); 
- }
- else
- {
- cfieldgroup * field_hdl_
- = (cfieldgroup *) field_hdl; 
- field_hdl_->freq_op.setValue(freq_op_val); 
- }
- }
- }
- 
-
-
- void xios_set_field_level (void * field_hdl, int ftype , const int * level)
- {
- int level_val = *level; 
- if (field_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cfield * field_hdl_ = (cfield *) field_hdl; 
- field_hdl_->level.setValue(level_val); 
- }
- else
- {
- cfieldgroup * field_hdl_
- = (cfieldgroup *) field_hdl; 
- field_hdl_->level.setValue(level_val); 
- }
- }
- }
- 
-
-
- void xios_set_field_prec (void * field_hdl, int ftype , const int * prec)
- {
- int prec_val = *prec; 
- if (field_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cfield * field_hdl_ = (cfield *) field_hdl; 
- field_hdl_->prec.setValue(prec_val); 
- }
- else
- {
- cfieldgroup * field_hdl_
- = (cfieldgroup *) field_hdl; 
- field_hdl_->prec.setValue(prec_val); 
- }
- }
- }
- 
-
-
- void xios_set_field_enabled (void * field_hdl, int ftype , const bool * enabled)
- {
- bool enabled_val = *enabled; 
- if (field_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cfield * field_hdl_ = (cfield *) field_hdl; 
- field_hdl_->enabled.setValue(enabled_val); 
- }
- else
- {
- cfieldgroup * field_hdl_
- = (cfieldgroup *) field_hdl; 
- field_hdl_->enabled.setValue(enabled_val); 
- }
- }
- }
- 
-
-
- void xios_set_field_domain_ref (void * field_hdl, int ftype , const char * domain_ref , const int * domain_ref_size)
- {
- 
- StdString domain_ref_valtemp; 
- StdSize d, f = 0; 
- if (*domain_ref_size != -1) 
- { 
- domain_ref_valtemp.append (domain_ref, *domain_ref_size); 
- d = domain_ref_valtemp.find_first_not_of(' '); 
- f = domain_ref_valtemp.find_last_not_of (' '); 
- } 
- StdString domain_ref_val = (*domain_ref_size != -1) ? domain_ref_valtemp.substr(d, f-d+1) : "" ; 
- 
- if (field_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cfield * field_hdl_ = (cfield *) field_hdl; 
- field_hdl_->domain_ref.setValue(domain_ref_val); 
- }
- else
- {
- cfieldgroup * field_hdl_
- = (cfieldgroup *) field_hdl; 
- field_hdl_->domain_ref.setValue(domain_ref_val); 
- }
- }
- }
- 
-
-
- void xios_set_field_axis_ref (void * field_hdl, int ftype , const char * axis_ref , const int * axis_ref_size)
- {
- 
- StdString axis_ref_valtemp; 
- StdSize d, f = 0; 
- if (*axis_ref_size != -1) 
- { 
- axis_ref_valtemp.append (axis_ref, *axis_ref_size); 
- d = axis_ref_valtemp.find_first_not_of(' '); 
- f = axis_ref_valtemp.find_last_not_of (' '); 
- } 
- StdString axis_ref_val = (*axis_ref_size != -1) ? axis_ref_valtemp.substr(d, f-d+1) : "" ; 
- 
- if (field_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cfield * field_hdl_ = (cfield *) field_hdl; 
- field_hdl_->axis_ref.setValue(axis_ref_val); 
- }
- else
- {
- cfieldgroup * field_hdl_
- = (cfieldgroup *) field_hdl; 
- field_hdl_->axis_ref.setValue(axis_ref_val); 
- }
- }
- }
- 
-
-
- void xios_set_field_grid_ref (void * field_hdl, int ftype , const char * grid_ref , const int * grid_ref_size)
- {
- 
- StdString grid_ref_valtemp; 
- StdSize d, f = 0; 
- if (*grid_ref_size != -1) 
- { 
- grid_ref_valtemp.append (grid_ref, *grid_ref_size); 
- d = grid_ref_valtemp.find_first_not_of(' '); 
- f = grid_ref_valtemp.find_last_not_of (' '); 
- } 
- StdString grid_ref_val = (*grid_ref_size != -1) ? grid_ref_valtemp.substr(d, f-d+1) : "" ; 
- 
- if (field_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cfield * field_hdl_ = (cfield *) field_hdl; 
- field_hdl_->grid_ref.setValue(grid_ref_val); 
- }
- else
- {
- cfieldgroup * field_hdl_
- = (cfieldgroup *) field_hdl; 
- field_hdl_->grid_ref.setValue(grid_ref_val); 
- }
- }
- }
- 
-
-
- void xios_set_field_zoom_ref (void * field_hdl, int ftype , const char * zoom_ref , const int * zoom_ref_size)
- {
- 
- StdString zoom_ref_valtemp; 
- StdSize d, f = 0; 
- if (*zoom_ref_size != -1) 
- { 
- zoom_ref_valtemp.append (zoom_ref, *zoom_ref_size); 
- d = zoom_ref_valtemp.find_first_not_of(' '); 
- f = zoom_ref_valtemp.find_last_not_of (' '); 
- } 
- StdString zoom_ref_val = (*zoom_ref_size != -1) ? zoom_ref_valtemp.substr(d, f-d+1) : "" ; 
- 
- if (field_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cfield * field_hdl_ = (cfield *) field_hdl; 
- field_hdl_->zoom_ref.setValue(zoom_ref_val); 
- }
- else
- {
- cfieldgroup * field_hdl_
- = (cfieldgroup *) field_hdl; 
- field_hdl_->zoom_ref.setValue(zoom_ref_val); 
- }
- }
- }
- 
-
-
- void xios_set_field_field_ref (void * field_hdl, int ftype , const char * field_ref , const int * field_ref_size)
- {
- 
- StdString field_ref_valtemp; 
- StdSize d, f = 0; 
- if (*field_ref_size != -1) 
- { 
- field_ref_valtemp.append (field_ref, *field_ref_size); 
- d = field_ref_valtemp.find_first_not_of(' '); 
- f = field_ref_valtemp.find_last_not_of (' '); 
- } 
- StdString field_ref_val = (*field_ref_size != -1) ? field_ref_valtemp.substr(d, f-d+1) : "" ; 
- 
- if (field_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cfield * field_hdl_ = (cfield *) field_hdl; 
- field_hdl_->field_ref.setValue(field_ref_val); 
- }
- else
- {
- cfieldgroup * field_hdl_
- = (cfieldgroup *) field_hdl; 
- field_hdl_->field_ref.setValue(field_ref_val); 
- }
- }
- }
- 
-
-
- void xios_set_context_calendar_type (void * context_hdl, int ftype , const char * calendar_type , const int * calendar_type_size)
- {
- 
- StdString calendar_type_valtemp; 
- StdSize d, f = 0; 
- if (*calendar_type_size != -1) 
- { 
- calendar_type_valtemp.append (calendar_type, *calendar_type_size); 
- d = calendar_type_valtemp.find_first_not_of(' '); 
- f = calendar_type_valtemp.find_last_not_of (' '); 
- } 
- StdString calendar_type_val = (*calendar_type_size != -1) ? calendar_type_valtemp.substr(d, f-d+1) : "" ; 
- 
- if (context_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- ccontext * context_hdl_ = (ccontext *) context_hdl; 
- context_hdl_->calendar_type.setValue(calendar_type_val); 
- }
- else
- {
- ccontextgroup * context_hdl_
- = (ccontextgroup *) context_hdl; 
- context_hdl_->calendar_type.setValue(calendar_type_val); 
- }
- }
- }
- 
-
-
- void xios_set_context_start_date (void * context_hdl, int ftype , const char * start_date , const int * start_date_size)
- {
- 
- StdString start_date_valtemp; 
- StdSize d, f = 0; 
- if (*start_date_size != -1) 
- { 
- start_date_valtemp.append (start_date, *start_date_size); 
- d = start_date_valtemp.find_first_not_of(' '); 
- f = start_date_valtemp.find_last_not_of (' '); 
- } 
- StdString start_date_val = (*start_date_size != -1) ? start_date_valtemp.substr(d, f-d+1) : "" ; 
- 
- if (context_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- ccontext * context_hdl_ = (ccontext *) context_hdl; 
- context_hdl_->start_date.setValue(start_date_val); 
- }
- else
- {
- ccontextgroup * context_hdl_
- = (ccontextgroup *) context_hdl; 
- context_hdl_->start_date.setValue(start_date_val); 
- }
- }
- }
- 
-
-
- void xios_set_domain_name (void * domain_hdl, int ftype , const char * name , const int * name_size)
- {
- 
- StdString name_valtemp; 
- StdSize d, f = 0; 
- if (*name_size != -1) 
- { 
- name_valtemp.append (name, *name_size); 
- d = name_valtemp.find_first_not_of(' '); 
- f = name_valtemp.find_last_not_of (' '); 
- } 
- StdString name_val = (*name_size != -1) ? name_valtemp.substr(d, f-d+1) : "" ; 
- 
- if (domain_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cdomain * domain_hdl_ = (cdomain *) domain_hdl; 
- domain_hdl_->name.setValue(name_val); 
- }
- else
- {
- cdomaingroup * domain_hdl_
- = (cdomaingroup *) domain_hdl; 
- domain_hdl_->name.setValue(name_val); 
- }
- }
- }
- 
-
-
- void xios_set_domain_standard_name (void * domain_hdl, int ftype , const char * standard_name , const int * standard_name_size)
- {
- 
- StdString standard_name_valtemp; 
- StdSize d, f = 0; 
- if (*standard_name_size != -1) 
- { 
- standard_name_valtemp.append (standard_name, *standard_name_size); 
- d = standard_name_valtemp.find_first_not_of(' '); 
- f = standard_name_valtemp.find_last_not_of (' '); 
- } 
- StdString standard_name_val = (*standard_name_size != -1) ? standard_name_valtemp.substr(d, f-d+1) : "" ; 
- 
- if (domain_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cdomain * domain_hdl_ = (cdomain *) domain_hdl; 
- domain_hdl_->standard_name.setValue(standard_name_val); 
- }
- else
- {
- cdomaingroup * domain_hdl_
- = (cdomaingroup *) domain_hdl; 
- domain_hdl_->standard_name.setValue(standard_name_val); 
- }
- }
- }
- 
-
-
- void xios_set_domain_long_name (void * domain_hdl, int ftype , const char * long_name , const int * long_name_size)
- {
- 
- StdString long_name_valtemp; 
- StdSize d, f = 0; 
- if (*long_name_size != -1) 
- { 
- long_name_valtemp.append (long_name, *long_name_size); 
- d = long_name_valtemp.find_first_not_of(' '); 
- f = long_name_valtemp.find_last_not_of (' '); 
- } 
- StdString long_name_val = (*long_name_size != -1) ? long_name_valtemp.substr(d, f-d+1) : "" ; 
- 
- if (domain_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cdomain * domain_hdl_ = (cdomain *) domain_hdl; 
- domain_hdl_->long_name.setValue(long_name_val); 
- }
- else
- {
- cdomaingroup * domain_hdl_
- = (cdomaingroup *) domain_hdl; 
- domain_hdl_->long_name.setValue(long_name_val); 
- }
- }
- }
- 
-
-
- void xios_set_domain_ni_glo (void * domain_hdl, int ftype , const int * ni_glo)
- {
- int ni_glo_val = *ni_glo; 
- if (domain_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cdomain * domain_hdl_ = (cdomain *) domain_hdl; 
- domain_hdl_->ni_glo.setValue(ni_glo_val); 
- }
- else
- {
- cdomaingroup * domain_hdl_
- = (cdomaingroup *) domain_hdl; 
- domain_hdl_->ni_glo.setValue(ni_glo_val); 
- }
- }
- }
- 
-
-
- void xios_set_domain_nj_glo (void * domain_hdl, int ftype , const int * nj_glo)
- {
- int nj_glo_val = *nj_glo; 
- if (domain_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cdomain * domain_hdl_ = (cdomain *) domain_hdl; 
- domain_hdl_->nj_glo.setValue(nj_glo_val); 
- }
- else
- {
- cdomaingroup * domain_hdl_
- = (cdomaingroup *) domain_hdl; 
- domain_hdl_->nj_glo.setValue(nj_glo_val); 
- }
- }
- }
- 
-
-
- void xios_set_domain_ibegin (void * domain_hdl, int ftype , const int * ibegin)
- {
- int ibegin_val = *ibegin; 
- if (domain_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cdomain * domain_hdl_ = (cdomain *) domain_hdl; 
- domain_hdl_->ibegin.setValue(ibegin_val); 
- }
- else
- {
- cdomaingroup * domain_hdl_
- = (cdomaingroup *) domain_hdl; 
- domain_hdl_->ibegin.setValue(ibegin_val); 
- }
- }
- }
- 
-
-
- void xios_set_domain_iend (void * domain_hdl, int ftype , const int * iend)
- {
- int iend_val = *iend; 
- if (domain_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cdomain * domain_hdl_ = (cdomain *) domain_hdl; 
- domain_hdl_->iend.setValue(iend_val); 
- }
- else
- {
- cdomaingroup * domain_hdl_
- = (cdomaingroup *) domain_hdl; 
- domain_hdl_->iend.setValue(iend_val); 
- }
- }
- }
- 
-
-
- void xios_set_domain_ni (void * domain_hdl, int ftype , const int * ni)
- {
- int ni_val = *ni; 
- if (domain_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cdomain * domain_hdl_ = (cdomain *) domain_hdl; 
- domain_hdl_->ni.setValue(ni_val); 
- }
- else
- {
- cdomaingroup * domain_hdl_
- = (cdomaingroup *) domain_hdl; 
- domain_hdl_->ni.setValue(ni_val); 
- }
- }
- }
- 
-
-
- void xios_set_domain_jbegin (void * domain_hdl, int ftype , const int * jbegin)
- {
- int jbegin_val = *jbegin; 
- if (domain_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cdomain * domain_hdl_ = (cdomain *) domain_hdl; 
- domain_hdl_->jbegin.setValue(jbegin_val); 
- }
- else
- {
- cdomaingroup * domain_hdl_
- = (cdomaingroup *) domain_hdl; 
- domain_hdl_->jbegin.setValue(jbegin_val); 
- }
- }
- }
- 
-
-
- void xios_set_domain_jend (void * domain_hdl, int ftype , const int * jend)
- {
- int jend_val = *jend; 
- if (domain_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cdomain * domain_hdl_ = (cdomain *) domain_hdl; 
- domain_hdl_->jend.setValue(jend_val); 
- }
- else
- {
- cdomaingroup * domain_hdl_
- = (cdomaingroup *) domain_hdl; 
- domain_hdl_->jend.setValue(jend_val); 
- }
- }
- }
- 
-
-
- void xios_set_domain_nj (void * domain_hdl, int ftype , const int * nj)
- {
- int nj_val = *nj; 
- if (domain_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cdomain * domain_hdl_ = (cdomain *) domain_hdl; 
- domain_hdl_->nj.setValue(nj_val); 
- }
- else
- {
- cdomaingroup * domain_hdl_
- = (cdomaingroup *) domain_hdl; 
- domain_hdl_->nj.setValue(nj_val); 
- }
- }
- }
- 
-
-
- void xios_set_domain_mask (void * domain_hdl, int ftype , const bool * mask , const int * mask_extent1 , const int * mask_extent2)
- {
- int mask_extent1_val = *mask_extent1; 
- int mask_extent2_val = *mask_extent2; 
- boost::shared_ptr<CArray<bool, 2> > mask_val 
- (new CArray<bool, 2>(boost::extents [mask_extent1_val][mask_extent2_val])); 
- std::copy(mask, &(mask[mask_val->num_elements()]), mask_val->data()); 
- 
- if (domain_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cdomain * domain_hdl_ = (cdomain *) domain_hdl; 
- domain_hdl_->mask.setValue(mask_val); 
- }
- else
- {
- cdomaingroup * domain_hdl_
- = (cdomaingroup *) domain_hdl; 
- domain_hdl_->mask.setValue(mask_val); 
- }
- }
- }
- 
-
-
- void xios_set_domain_data_dim (void * domain_hdl, int ftype , const int * data_dim)
- {
- int data_dim_val = *data_dim; 
- if (domain_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cdomain * domain_hdl_ = (cdomain *) domain_hdl; 
- domain_hdl_->data_dim.setValue(data_dim_val); 
- }
- else
- {
- cdomaingroup * domain_hdl_
- = (cdomaingroup *) domain_hdl; 
- domain_hdl_->data_dim.setValue(data_dim_val); 
- }
- }
- }
- 
-
-
- void xios_set_domain_data_ni (void * domain_hdl, int ftype , const int * data_ni)
- {
- int data_ni_val = *data_ni; 
- if (domain_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cdomain * domain_hdl_ = (cdomain *) domain_hdl; 
- domain_hdl_->data_ni.setValue(data_ni_val); 
- }
- else
- {
- cdomaingroup * domain_hdl_
- = (cdomaingroup *) domain_hdl; 
- domain_hdl_->data_ni.setValue(data_ni_val); 
- }
- }
- }
- 
-
-
- void xios_set_domain_data_nj (void * domain_hdl, int ftype , const int * data_nj)
- {
- int data_nj_val = *data_nj; 
- if (domain_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cdomain * domain_hdl_ = (cdomain *) domain_hdl; 
- domain_hdl_->data_nj.setValue(data_nj_val); 
- }
- else
- {
- cdomaingroup * domain_hdl_
- = (cdomaingroup *) domain_hdl; 
- domain_hdl_->data_nj.setValue(data_nj_val); 
- }
- }
- }
- 
-
-
- void xios_set_domain_data_ibegin (void * domain_hdl, int ftype , const int * data_ibegin)
- {
- int data_ibegin_val = *data_ibegin; 
- if (domain_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cdomain * domain_hdl_ = (cdomain *) domain_hdl; 
- domain_hdl_->data_ibegin.setValue(data_ibegin_val); 
- }
- else
- {
- cdomaingroup * domain_hdl_
- = (cdomaingroup *) domain_hdl; 
- domain_hdl_->data_ibegin.setValue(data_ibegin_val); 
- }
- }
- }
- 
-
-
- void xios_set_domain_data_jbegin (void * domain_hdl, int ftype , const int * data_jbegin)
- {
- int data_jbegin_val = *data_jbegin; 
- if (domain_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cdomain * domain_hdl_ = (cdomain *) domain_hdl; 
- domain_hdl_->data_jbegin.setValue(data_jbegin_val); 
- }
- else
- {
- cdomaingroup * domain_hdl_
- = (cdomaingroup *) domain_hdl; 
- domain_hdl_->data_jbegin.setValue(data_jbegin_val); 
- }
- }
- }
- 
-
-
- void xios_set_domain_data_n_index (void * domain_hdl, int ftype , const int * data_n_index)
- {
- int data_n_index_val = *data_n_index; 
- if (domain_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cdomain * domain_hdl_ = (cdomain *) domain_hdl; 
- domain_hdl_->data_n_index.setValue(data_n_index_val); 
- }
- else
- {
- cdomaingroup * domain_hdl_
- = (cdomaingroup *) domain_hdl; 
- domain_hdl_->data_n_index.setValue(data_n_index_val); 
- }
- }
- }
- 
-
-
- void xios_set_domain_data_i_index (void * domain_hdl, int ftype , const int * data_i_index , const int * data_i_index_extent1)
- {
- int data_i_index_extent1_val = *data_i_index_extent1; 
- boost::shared_ptr<CArray<int, 1> > data_i_index_val 
- (new CArray<int, 1>(boost::extents [data_i_index_extent1_val])); 
- std::copy(data_i_index, &(data_i_index[data_i_index_val->num_elements()]), data_i_index_val->data()); 
- 
- if (domain_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cdomain * domain_hdl_ = (cdomain *) domain_hdl; 
- domain_hdl_->data_i_index.setValue(data_i_index_val); 
- }
- else
- {
- cdomaingroup * domain_hdl_
- = (cdomaingroup *) domain_hdl; 
- domain_hdl_->data_i_index.setValue(data_i_index_val); 
- }
- }
- }
- 
-
-
- void xios_set_domain_data_j_index (void * domain_hdl, int ftype , const int * data_j_index , const int * data_j_index_extent1)
- {
- int data_j_index_extent1_val = *data_j_index_extent1; 
- boost::shared_ptr<CArray<int, 1> > data_j_index_val 
- (new CArray<int, 1>(boost::extents [data_j_index_extent1_val])); 
- std::copy(data_j_index, &(data_j_index[data_j_index_val->num_elements()]), data_j_index_val->data()); 
- 
- if (domain_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cdomain * domain_hdl_ = (cdomain *) domain_hdl; 
- domain_hdl_->data_j_index.setValue(data_j_index_val); 
- }
- else
- {
- cdomaingroup * domain_hdl_
- = (cdomaingroup *) domain_hdl; 
- domain_hdl_->data_j_index.setValue(data_j_index_val); 
- }
- }
- }
- 
-
-
- void xios_set_domain_lonvalue (void * domain_hdl, int ftype , const double * lonvalue , const int * lonvalue_extent1)
- {
- int lonvalue_extent1_val = *lonvalue_extent1; 
- boost::shared_ptr<CArray<double, 1> > lonvalue_val 
- (new CArray<double, 1>(boost::extents [lonvalue_extent1_val])); 
- std::copy(lonvalue, &(lonvalue[lonvalue_val->num_elements()]), lonvalue_val->data()); 
- 
- if (domain_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cdomain * domain_hdl_ = (cdomain *) domain_hdl; 
- domain_hdl_->lonvalue.setValue(lonvalue_val); 
- }
- else
- {
- cdomaingroup * domain_hdl_
- = (cdomaingroup *) domain_hdl; 
- domain_hdl_->lonvalue.setValue(lonvalue_val); 
- }
- }
- }
- 
-
-
- void xios_set_domain_latvalue (void * domain_hdl, int ftype , const double * latvalue , const int * latvalue_extent1)
- {
- int latvalue_extent1_val = *latvalue_extent1; 
- boost::shared_ptr<CArray<double, 1> > latvalue_val 
- (new CArray<double, 1>(boost::extents [latvalue_extent1_val])); 
- std::copy(latvalue, &(latvalue[latvalue_val->num_elements()]), latvalue_val->data()); 
- 
- if (domain_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cdomain * domain_hdl_ = (cdomain *) domain_hdl; 
- domain_hdl_->latvalue.setValue(latvalue_val); 
- }
- else
- {
- cdomaingroup * domain_hdl_
- = (cdomaingroup *) domain_hdl; 
- domain_hdl_->latvalue.setValue(latvalue_val); 
- }
- }
- }
- 
-
-
- void xios_set_file_name (void * file_hdl, int ftype , const char * name , const int * name_size)
- {
- 
- StdString name_valtemp; 
- StdSize d, f = 0; 
- if (*name_size != -1) 
- { 
- name_valtemp.append (name, *name_size); 
- d = name_valtemp.find_first_not_of(' '); 
- f = name_valtemp.find_last_not_of (' '); 
- } 
- StdString name_val = (*name_size != -1) ? name_valtemp.substr(d, f-d+1) : "" ; 
- 
- if (file_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cfile * file_hdl_ = (cfile *) file_hdl; 
- file_hdl_->name.setValue(name_val); 
- }
- else
- {
- cfilegroup * file_hdl_
- = (cfilegroup *) file_hdl; 
- file_hdl_->name.setValue(name_val); 
- }
- }
- }
- 
-
-
- void xios_set_file_description (void * file_hdl, int ftype , const char * description , const int * description_size)
- {
- 
- StdString description_valtemp; 
- StdSize d, f = 0; 
- if (*description_size != -1) 
- { 
- description_valtemp.append (description, *description_size); 
- d = description_valtemp.find_first_not_of(' '); 
- f = description_valtemp.find_last_not_of (' '); 
- } 
- StdString description_val = (*description_size != -1) ? description_valtemp.substr(d, f-d+1) : "" ; 
- 
- if (file_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cfile * file_hdl_ = (cfile *) file_hdl; 
- file_hdl_->description.setValue(description_val); 
- }
- else
- {
- cfilegroup * file_hdl_
- = (cfilegroup *) file_hdl; 
- file_hdl_->description.setValue(description_val); 
- }
- }
- }
- 
-
-
- void xios_set_file_output_freq (void * file_hdl, int ftype , const char * output_freq , const int * output_freq_size)
- {
- 
- StdString output_freq_valtemp; 
- StdSize d, f = 0; 
- if (*output_freq_size != -1) 
- { 
- output_freq_valtemp.append (output_freq, *output_freq_size); 
- d = output_freq_valtemp.find_first_not_of(' '); 
- f = output_freq_valtemp.find_last_not_of (' '); 
- } 
- StdString output_freq_val = (*output_freq_size != -1) ? output_freq_valtemp.substr(d, f-d+1) : "" ; 
- 
- if (file_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cfile * file_hdl_ = (cfile *) file_hdl; 
- file_hdl_->output_freq.setValue(output_freq_val); 
- }
- else
- {
- cfilegroup * file_hdl_
- = (cfilegroup *) file_hdl; 
- file_hdl_->output_freq.setValue(output_freq_val); 
- }
- }
- }
- 
-
-
- void xios_set_file_output_level (void * file_hdl, int ftype , const int * output_level)
- {
- int output_level_val = *output_level; 
- if (file_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cfile * file_hdl_ = (cfile *) file_hdl; 
- file_hdl_->output_level.setValue(output_level_val); 
- }
- else
- {
- cfilegroup * file_hdl_
- = (cfilegroup *) file_hdl; 
- file_hdl_->output_level.setValue(output_level_val); 
- }
- }
- }
- 
-
-
- void xios_set_file_enabled (void * file_hdl, int ftype , const bool * enabled)
- {
- bool enabled_val = *enabled; 
- if (file_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cfile * file_hdl_ = (cfile *) file_hdl; 
- file_hdl_->enabled.setValue(enabled_val); 
- }
- else
- {
- cfilegroup * file_hdl_
- = (cfilegroup *) file_hdl; 
- file_hdl_->enabled.setValue(enabled_val); 
- }
- }
- }
- 
-
-
- void xios_set_grid_name (void * grid_hdl, int ftype , const char * name , const int * name_size)
- {
- 
- StdString name_valtemp; 
- StdSize d, f = 0; 
- if (*name_size != -1) 
- { 
- name_valtemp.append (name, *name_size); 
- d = name_valtemp.find_first_not_of(' '); 
- f = name_valtemp.find_last_not_of (' '); 
- } 
- StdString name_val = (*name_size != -1) ? name_valtemp.substr(d, f-d+1) : "" ; 
- 
- if (grid_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cgrid * grid_hdl_ = (cgrid *) grid_hdl; 
- grid_hdl_->name.setValue(name_val); 
- }
- else
- {
- cgridgroup * grid_hdl_
- = (cgridgroup *) grid_hdl; 
- grid_hdl_->name.setValue(name_val); 
- }
- }
- }
- 
-
-
- void xios_set_grid_description (void * grid_hdl, int ftype , const char * description , const int * description_size)
- {
- 
- StdString description_valtemp; 
- StdSize d, f = 0; 
- if (*description_size != -1) 
- { 
- description_valtemp.append (description, *description_size); 
- d = description_valtemp.find_first_not_of(' '); 
- f = description_valtemp.find_last_not_of (' '); 
- } 
- StdString description_val = (*description_size != -1) ? description_valtemp.substr(d, f-d+1) : "" ; 
- 
- if (grid_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cgrid * grid_hdl_ = (cgrid *) grid_hdl; 
- grid_hdl_->description.setValue(description_val); 
- }
- else
- {
- cgridgroup * grid_hdl_
- = (cgridgroup *) grid_hdl; 
- grid_hdl_->description.setValue(description_val); 
- }
- }
- }
- 
-
-
- void xios_set_grid_domain_ref (void * grid_hdl, int ftype , const char * domain_ref , const int * domain_ref_size)
- {
- 
- StdString domain_ref_valtemp; 
- StdSize d, f = 0; 
- if (*domain_ref_size != -1) 
- { 
- domain_ref_valtemp.append (domain_ref, *domain_ref_size); 
- d = domain_ref_valtemp.find_first_not_of(' '); 
- f = domain_ref_valtemp.find_last_not_of (' '); 
- } 
- StdString domain_ref_val = (*domain_ref_size != -1) ? domain_ref_valtemp.substr(d, f-d+1) : "" ; 
- 
- if (grid_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cgrid * grid_hdl_ = (cgrid *) grid_hdl; 
- grid_hdl_->domain_ref.setValue(domain_ref_val); 
- }
- else
- {
- cgridgroup * grid_hdl_
- = (cgridgroup *) grid_hdl; 
- grid_hdl_->domain_ref.setValue(domain_ref_val); 
- }
- }
- }
- 
-
-
- void xios_set_grid_axis_ref (void * grid_hdl, int ftype , const char * axis_ref , const int * axis_ref_size)
- {
- 
- StdString axis_ref_valtemp; 
- StdSize d, f = 0; 
- if (*axis_ref_size != -1) 
- { 
- axis_ref_valtemp.append (axis_ref, *axis_ref_size); 
- d = axis_ref_valtemp.find_first_not_of(' '); 
- f = axis_ref_valtemp.find_last_not_of (' '); 
- } 
- StdString axis_ref_val = (*axis_ref_size != -1) ? axis_ref_valtemp.substr(d, f-d+1) : "" ; 
- 
- if (grid_hdl != NULL) 
- {
- if (ftype < GAXIS)
- {
- cgrid * grid_hdl_ = (cgrid *) grid_hdl; 
- grid_hdl_->axis_ref.setValue(axis_ref_val); 
- }
- else
- {
- cgridgroup * grid_hdl_
- = (cgridgroup *) grid_hdl; 
- grid_hdl_->axis_ref.setValue(axis_ref_val); 
- }
- }
- }
- 
-
-void xios_handle_create (XPtr * const _ret, XDType _dtype, const XString _id, XSize _id_len)
-{
-   
- StdString __idtemp; 
- StdSize d, f = 0; 
- if (_id_len != -1) 
- { 
- __idtemp.append (_id, _id_len); 
- d = __idtemp.find_first_not_of(' '); 
- f = __idtemp.find_last_not_of (' '); 
- } 
- StdString __id = (_id_len != -1) ? __idtemp.substr(d, f-d+1) : "" ; 
-
-   switch(_dtype)
-   {
-      case (ECONTEXT):
-         *_ret = (!CObjectFactory::HasObject<CContext>(__id))
-               ? 0 : CObjectFactory::GetObject<CContext>(__id).get();
-         return ;
-      case (EAXIS): 
- { 
- *_ret = (!CObjectFactory::HasObject<CAxis>(__id))
- ? 0 : CObjectFactory::GetObject<CAxis>(__id).get(); 
- return; 
-}
- case (GAXIS): 
- { 
- *_ret = (!CObjectFactory::HasObject<CAxisGroup>(__id))
- ? 0 : CObjectFactory::GetObject<CAxisGroup>(__id).get(); 
- return; 
-}
-
-      case (EDOMAIN): 
- { 
- *_ret = (!CObjectFactory::HasObject<CDomain>(__id))
- ? 0 : CObjectFactory::GetObject<CDomain>(__id).get(); 
- return; 
-}
- case (GDOMAIN): 
- { 
- *_ret = (!CObjectFactory::HasObject<CDomainGroup>(__id))
- ? 0 : CObjectFactory::GetObject<CDomainGroup>(__id).get(); 
- return; 
-}
-
-      case (EFIELD): 
- { 
- *_ret = (!CObjectFactory::HasObject<CField>(__id))
- ? 0 : CObjectFactory::GetObject<CField>(__id).get(); 
- return; 
-}
- case (GFIELD): 
- { 
- *_ret = (!CObjectFactory::HasObject<CFieldGroup>(__id))
- ? 0 : CObjectFactory::GetObject<CFieldGroup>(__id).get(); 
- return; 
-}
-
-      case (EFILE): 
- { 
- *_ret = (!CObjectFactory::HasObject<CFile>(__id))
- ? 0 : CObjectFactory::GetObject<CFile>(__id).get(); 
- return; 
-}
- case (GFILE): 
- { 
- *_ret = (!CObjectFactory::HasObject<CFileGroup>(__id))
- ? 0 : CObjectFactory::GetObject<CFileGroup>(__id).get(); 
- return; 
-}
-
-      case (EGRID): 
- { 
- *_ret = (!CObjectFactory::HasObject<CGrid>(__id))
- ? 0 : CObjectFactory::GetObject<CGrid>(__id).get(); 
- return; 
-}
- case (GGRID): 
- { 
- *_ret = (!CObjectFactory::HasObject<CGridGroup>(__id))
- ? 0 : CObjectFactory::GetObject<CGridGroup>(__id).get(); 
- return; 
-}
-
-      default :
-         *_ret = 0;
-         return;
-   }
-}
-void xios_xml_parse_file (const XString _filename, XSize _filename_len)
-{
-   try
-   {
-      
- StdString __filenametemp; 
- StdSize d, f = 0; 
- if (_filename_len != -1) 
- { 
- __filenametemp.append (_filename, _filename_len); 
- d = __filenametemp.find_first_not_of(' '); 
- f = __filenametemp.find_last_not_of (' '); 
- } 
- StdString __filename = (_filename_len != -1) ? __filenametemp.substr(d, f-d+1) : "" ; ;
-      CTreeManager::ParseFile(__filename);
-      StdOStringStream oss;
-      oss << StdString("data/def/def_client_pre.")
-          << CMPIManager::GetCommRank(CMPIManager::GetCommWorld());
-      CTreeManager::PrintTreeToFile(oss.str());
-   }
-   catch (CException & exc)
-   {
-      std::cerr << exc.getMessage() << std::endl;
-      exit (EXIT_FAILURE);
-   }
-}
-void xios_xml_parse_string(const XString _xmlcontent, XSize _xmlcontent_len)
-{
-   try
-   {
-      
- StdString __xmlcontenttemp; 
- StdSize d, f = 0; 
- if (_xmlcontent_len != -1) 
- { 
- __xmlcontenttemp.append (_xmlcontent, _xmlcontent_len); 
- d = __xmlcontenttemp.find_first_not_of(' '); 
- f = __xmlcontenttemp.find_last_not_of (' '); 
- } 
- StdString __xmlcontent = (_xmlcontent_len != -1) ? __xmlcontenttemp.substr(d, f-d+1) : "" ; ;
-      CTreeManager::ParseString(__xmlcontent);
-      StdOStringStream oss;
-      oss << StdString("data/def/def_client_pre.")
-          << CMPIManager::GetCommRank(CMPIManager::GetCommWorld());
-      CTreeManager::PrintTreeToFile(oss.str());
-   }
-   catch (CException & exc)
-   {
-      std::cerr << exc.getMessage() << std::endl;
-      exit (EXIT_FAILURE);
-   }
-}
-void xios_context_set_current (XPtr const _ctx, bool _wswap)
-{
-   boost::shared_ptr<CContext> context = CObjectFactory::GetObject<CContext> ((CContext*)_ctx);
-   CTreeManager::SetCurrentContextId(context->getId());
-}
-void xios_context_create (XPtr * _ctxt, const XString _ctxt_id,
-                          XSize _ctxt_id_len, XCalendarType _calType,
-                          XInt yr, XInt mth, XInt dd,
-                          XInt hr, XInt min, XInt sec)
-{
-   try
-   {
-      
- StdString __ctxt_idtemp; 
- StdSize d, f = 0; 
- if (_ctxt_id_len != -1) 
- { 
- __ctxt_idtemp.append (_ctxt_id, _ctxt_id_len); 
- d = __ctxt_idtemp.find_first_not_of(' '); 
- f = __ctxt_idtemp.find_last_not_of (' '); 
- } 
- StdString __ctxt_id = (_ctxt_id_len != -1) ? __ctxt_idtemp.substr(d, f-d+1) : "" ; ;
-      boost::shared_ptr<CContext> context = CTreeManager::CreateContext(__ctxt_id);
-      *_ctxt = context.get();
-   }
-   catch (CException & exc)
-   {
-      std::cerr << exc.getMessage() << std::endl;
-      exit (EXIT_FAILURE);
-   }
-}
-void xios_xml_tree_add(const XPtr _parent, XDType _parent_type, XPtr * _child,
-                       XDType _child_type, const XString _child_id, XSize _child_id_len)
-{
-   
- StdString __child_idtemp; 
- StdSize d, f = 0; 
- if (_child_id_len != -1) 
- { 
- __child_idtemp.append (_child_id, _child_id_len); 
- d = __child_idtemp.find_first_not_of(' '); 
- f = __child_idtemp.find_last_not_of (' '); 
- } 
- StdString __child_id = (_child_id_len != -1) ? __child_idtemp.substr(d, f-d+1) : "" ; 
-
-   try
-   {
-      switch (_parent_type)
-      {
-         case (EFILE) :
-         {
-            CFile * _file = (CFile *) _parent;
-            boost::shared_ptr<CFile> file = CObjectFactory::GetObject<CFile>(_file);
-            if (!CObjectFactory::HasObject<CFieldGroup>(file->getId()))
-               file->setVirtualFieldGroup(file->getId());
-            xios_xml_tree_add (file->getVirtualFieldGroup().get(), GFIELD,
-                              _child, EFIELD, _child_id, _child_id_len);
-            return;
-         }
-         case (GAXIS) : 
- { 
- CAxisGroup * _group = (CAxisGroup *) _parent; boost::shared_ptr<CAxisGroup> group = 
- CObjectFactory::GetObject<CAxisGroup>(_group); 
- switch(_child_type) 
- { 
- case (GAXIS) : 
- if ((_child_id_len != -1) && 
- (CObjectFactory::HasObject<CAxisGroup>(__child_id))) 
- return; 
- *_child = CGroupFactory::CreateGroup(group, __child_id).get(); 
- break; 
- case (EAXIS) : 
- if ((_child_id_len != -1) && 
- (CObjectFactory::HasObject<CAxis>(__child_id))) 
- return; 
- *_child = CGroupFactory::CreateChild(group, __child_id).get(); 
- break; 
- default : 
- std::cerr << "[xml_tree_add] Type enfant invalide" << std::endl; 
- }; 
- return; 
- };
-         case (GGRID) : 
- { 
- CGridGroup * _group = (CGridGroup *) _parent; boost::shared_ptr<CGridGroup> group = 
- CObjectFactory::GetObject<CGridGroup>(_group); 
- switch(_child_type) 
- { 
- case (GGRID) : 
- if ((_child_id_len != -1) && 
- (CObjectFactory::HasObject<CGridGroup>(__child_id))) 
- return; 
- *_child = CGroupFactory::CreateGroup(group, __child_id).get(); 
- break; 
- case (EGRID) : 
- if ((_child_id_len != -1) && 
- (CObjectFactory::HasObject<CGrid>(__child_id))) 
- return; 
- *_child = CGroupFactory::CreateChild(group, __child_id).get(); 
- break; 
- default : 
- std::cerr << "[xml_tree_add] Type enfant invalide" << std::endl; 
- }; 
- return; 
- };
-         case (GDOMAIN) : 
- { 
- CDomainGroup * _group = (CDomainGroup *) _parent; boost::shared_ptr<CDomainGroup> group = 
- CObjectFactory::GetObject<CDomainGroup>(_group); 
- switch(_child_type) 
- { 
- case (GDOMAIN) : 
- if ((_child_id_len != -1) && 
- (CObjectFactory::HasObject<CDomainGroup>(__child_id))) 
- return; 
- *_child = CGroupFactory::CreateGroup(group, __child_id).get(); 
- break; 
- case (EDOMAIN) : 
- if ((_child_id_len != -1) && 
- (CObjectFactory::HasObject<CDomain>(__child_id))) 
- return; 
- *_child = CGroupFactory::CreateChild(group, __child_id).get(); 
- break; 
- default : 
- std::cerr << "[xml_tree_add] Type enfant invalide" << std::endl; 
- }; 
- return; 
- };
-         case (GFIELD) : 
- { 
- CFieldGroup * _group = (CFieldGroup *) _parent; boost::shared_ptr<CFieldGroup> group = 
- CObjectFactory::GetObject<CFieldGroup>(_group); 
- switch(_child_type) 
- { 
- case (GFIELD) : 
- if ((_child_id_len != -1) && 
- (CObjectFactory::HasObject<CFieldGroup>(__child_id))) 
- return; 
- *_child = CGroupFactory::CreateGroup(group, __child_id).get(); 
- break; 
- case (EFIELD) : 
- if ((_child_id_len != -1) && 
- (CObjectFactory::HasObject<CField>(__child_id))) 
- return; 
- *_child = CGroupFactory::CreateChild(group, __child_id).get(); 
- break; 
- default : 
- std::cerr << "[xml_tree_add] Type enfant invalide" << std::endl; 
- }; 
- return; 
- };
-         case (GFILE) : 
- { 
- CFileGroup * _group = (CFileGroup *) _parent; boost::shared_ptr<CFileGroup> group = 
- CObjectFactory::GetObject<CFileGroup>(_group); 
- switch(_child_type) 
- { 
- case (GFILE) : 
- if ((_child_id_len != -1) && 
- (CObjectFactory::HasObject<CFileGroup>(__child_id))) 
- return; 
- *_child = CGroupFactory::CreateGroup(group, __child_id).get(); 
- break; 
- case (EFILE) : 
- if ((_child_id_len != -1) && 
- (CObjectFactory::HasObject<CFile>(__child_id))) 
- return; 
- *_child = CGroupFactory::CreateChild(group, __child_id).get(); 
- break; 
- default : 
- std::cerr << "[xml_tree_add] Type enfant invalide" << std::endl; 
- }; 
- return; 
- };
-         default :
-            std::cerr << "[xml_tree_add] Type parent invalide" << std::endl;
-            return;
-      }
-   }
-   catch (CException & exc)
-   {
-      std::cerr << exc.getMessage() << std::endl;
-      exit (EXIT_FAILURE);
-   }
-}
-void xios_xml_tree_show(const XString _filename, XSize _filename_len)
-{
-   
- StdString __filenametemp; 
- StdSize d, f = 0; 
- if (_filename_len != -1) 
- { 
- __filenametemp.append (_filename, _filename_len); 
- d = __filenametemp.find_first_not_of(' '); 
- f = __filenametemp.find_last_not_of (' '); 
- } 
- StdString __filename = (_filename_len != -1) ? __filenametemp.substr(d, f-d+1) : "" ; 
-
-   if (_filename_len != -1)
-      CTreeManager::PrintTreeToFile(__filename);
-   else
-      CTreeManager::PrintTreeToStream(std::clog);
-}
-void xios_dtreatment_start(XPtr const _context, XFileType filetype)
-{
-   try
-   {
-      StdOStringStream oss;
-      oss << StdString("data/def/def_client_next.")
-          << CMPIManager::GetCommRank(CMPIManager::GetCommWorld());
-      CTreeManager::PrintTreeToFile(oss.str());
-      CDataTreatment dt;
-      dt.createDataOutput<CNc4DataOutput>();
-      oss.str("");
-      oss << StdString("data/def/def_client_end.")
-          << CMPIManager::GetCommRank(CMPIManager::GetCommWorld());
-      CTreeManager::PrintTreeToFile(oss.str());
-   }
-   catch (CException & exc)
-   {
-      std::cerr << exc.getMessage() << std::endl;
-      exit (EXIT_FAILURE);
-   }
-}
-void xios_dtreatment_end(void)
-{
-}
-void xios_write_data(const XString _field_id, XSize _field_id_len, double * data_k8,
-                     XSize data_Xsize, XSize data_Ysize, XSize data_Zsize)
-{
-}
-void xios_update_calendar(int step)
-{
-}
-void xios_set_timestep(double ts_year, double ts_month, double ts_day,
-                       double ts_hour, double ts_minute, double ts_second)
-{
-}
-}
