Changeset 336


Ignore:
Timestamp:
03/30/12 15:52:19 (9 years ago)
Author:
ymipsl
Message:

update fortran interface

YM

Location:
XIOS/trunk/src/interface
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/interface/c_attr/iccontext_attr.cpp

    r335 r336  
    6060   
    6161   
     62  void cxios_set_context_time_origin(context_Ptr context_hdl, const char * time_origin, int time_origin_size) 
     63  { 
     64    std::string time_origin_str; 
     65    if(!cstr2string(time_origin, time_origin_size, time_origin_str)) return; 
     66    context_hdl->time_origin.setValue(time_origin_str); 
     67    context_hdl->sendAttributToServer(context_hdl->time_origin); 
     68  } 
     69   
     70  void cxios_get_context_time_origin(context_Ptr context_hdl, char * time_origin, int time_origin_size) 
     71  { 
     72    if(!string_copy(context_hdl->time_origin.getValue(),time_origin , time_origin_size)) 
     73      ERROR("void cxios_get_context_time_origin(context_Ptr context_hdl, char * time_origin, int time_origin_size)", <<"Input string is to short"); 
     74  } 
     75   
     76   
    6277  void cxios_set_context_timestep(context_Ptr context_hdl, const char * timestep, int timestep_size) 
    6378  { 
  • XIOS/trunk/src/interface/c_attr/icfile_attr.cpp

    r335 r336  
    9999   
    100100   
     101  void cxios_set_file_par_access(file_Ptr file_hdl, const char * par_access, int par_access_size) 
     102  { 
     103    std::string par_access_str; 
     104    if(!cstr2string(par_access, par_access_size, par_access_str)) return; 
     105    file_hdl->par_access.setValue(par_access_str); 
     106    file_hdl->sendAttributToServer(file_hdl->par_access); 
     107  } 
     108   
     109  void cxios_get_file_par_access(file_Ptr file_hdl, char * par_access, int par_access_size) 
     110  { 
     111    if(!string_copy(file_hdl->par_access.getValue(),par_access , par_access_size)) 
     112      ERROR("void cxios_get_file_par_access(file_Ptr file_hdl, char * par_access, int par_access_size)", <<"Input string is to short"); 
     113  } 
     114   
     115   
    101116  void cxios_set_file_split_freq(file_Ptr file_hdl, const char * split_freq, int split_freq_size) 
    102117  { 
  • XIOS/trunk/src/interface/c_attr/icfilegroup_attr.cpp

    r335 r336  
    114114   
    115115   
     116  void cxios_set_filegroup_par_access(filegroup_Ptr filegroup_hdl, const char * par_access, int par_access_size) 
     117  { 
     118    std::string par_access_str; 
     119    if(!cstr2string(par_access, par_access_size, par_access_str)) return; 
     120    filegroup_hdl->par_access.setValue(par_access_str); 
     121    filegroup_hdl->sendAttributToServer(filegroup_hdl->par_access); 
     122  } 
     123   
     124  void cxios_get_filegroup_par_access(filegroup_Ptr filegroup_hdl, char * par_access, int par_access_size) 
     125  { 
     126    if(!string_copy(filegroup_hdl->par_access.getValue(),par_access , par_access_size)) 
     127      ERROR("void cxios_get_filegroup_par_access(filegroup_Ptr filegroup_hdl, char * par_access, int par_access_size)", <<"Input string is to short"); 
     128  } 
     129   
     130   
    116131  void cxios_set_filegroup_split_freq(filegroup_Ptr filegroup_hdl, const char * split_freq, int split_freq_size) 
    117132  { 
  • XIOS/trunk/src/interface/fortran_attr/context_interface_attr.f90

    r326 r336  
    5454     
    5555     
     56    SUBROUTINE cxios_set_context_time_origin(context_hdl, time_origin, time_origin_size) BIND(C) 
     57      USE ISO_C_BINDING 
     58      INTEGER (kind = C_INTPTR_T), VALUE :: context_hdl 
     59      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: time_origin 
     60      INTEGER  (kind = C_INT)     , VALUE        :: time_origin_size 
     61    END SUBROUTINE cxios_set_context_time_origin 
     62     
     63    SUBROUTINE cxios_get_context_time_origin(context_hdl, time_origin, time_origin_size) BIND(C) 
     64      USE ISO_C_BINDING 
     65      INTEGER (kind = C_INTPTR_T), VALUE :: context_hdl 
     66      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: time_origin 
     67      INTEGER  (kind = C_INT)     , VALUE        :: time_origin_size 
     68    END SUBROUTINE cxios_get_context_time_origin 
     69     
     70     
    5671    SUBROUTINE cxios_set_context_timestep(context_hdl, timestep, timestep_size) BIND(C) 
    5772      USE ISO_C_BINDING 
  • XIOS/trunk/src/interface/fortran_attr/file_interface_attr.f90

    r326 r336  
    9595     
    9696     
     97    SUBROUTINE cxios_set_file_par_access(file_hdl, par_access, par_access_size) BIND(C) 
     98      USE ISO_C_BINDING 
     99      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl 
     100      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: par_access 
     101      INTEGER  (kind = C_INT)     , VALUE        :: par_access_size 
     102    END SUBROUTINE cxios_set_file_par_access 
     103     
     104    SUBROUTINE cxios_get_file_par_access(file_hdl, par_access, par_access_size) BIND(C) 
     105      USE ISO_C_BINDING 
     106      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl 
     107      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: par_access 
     108      INTEGER  (kind = C_INT)     , VALUE        :: par_access_size 
     109    END SUBROUTINE cxios_get_file_par_access 
     110     
     111     
    97112    SUBROUTINE cxios_set_file_split_freq(file_hdl, split_freq, split_freq_size) BIND(C) 
    98113      USE ISO_C_BINDING 
  • XIOS/trunk/src/interface/fortran_attr/filegroup_interface_attr.f90

    r326 r336  
    110110     
    111111     
     112    SUBROUTINE cxios_set_filegroup_par_access(filegroup_hdl, par_access, par_access_size) BIND(C) 
     113      USE ISO_C_BINDING 
     114      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl 
     115      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: par_access 
     116      INTEGER  (kind = C_INT)     , VALUE        :: par_access_size 
     117    END SUBROUTINE cxios_set_filegroup_par_access 
     118     
     119    SUBROUTINE cxios_get_filegroup_par_access(filegroup_hdl, par_access, par_access_size) BIND(C) 
     120      USE ISO_C_BINDING 
     121      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl 
     122      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: par_access 
     123      INTEGER  (kind = C_INT)     , VALUE        :: par_access_size 
     124    END SUBROUTINE cxios_get_filegroup_par_access 
     125     
     126     
    112127    SUBROUTINE cxios_set_filegroup_split_freq(filegroup_hdl, split_freq, split_freq_size) BIND(C) 
    113128      USE ISO_C_BINDING 
Note: See TracChangeset for help on using the changeset viewer.