Changeset 133


Ignore:
Timestamp:
10/14/10 15:40:26 (14 years ago)
Author:
hozdoba
Message:
 
Location:
XMLIO_V2/dev/dev_rv/src/XMLIO
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • XMLIO_V2/dev/dev_rv/src/XMLIO/c_interface.cpp

    r132 r133  
    1818} 
    1919 
    20 static inline XString stringXtoStd(const std::string& _str) 
     20static inline XString stringXtoStd(const std::string& _str) // Non testée 
    2121{ 
    2222   XString _retstr = {new char[_str.size()](), _str.size()}; 
     
    7979   XMLParser::Parse(node); 
    8080} 
     81 
    8182/* ********************************************************** */ 
    8283/*                      DATA TREATMENT INTERFACE              */ 
     
    9091   for (it  = AllDataTreatment.begin(); 
    9192        it != AllDataTreatment.end(); it++) 
    92       delete (*it); 
     93      if (*it != NULL) delete (*it); 
    9394} 
    9495 
     
    113114void xios_dtreatment_create_files_and_headers_(const XHandle * const _hd, const XFileType * const _ft) 
    114115{ 
    115    // Si le handle de traitement n'est pas initialisé à 0, on ne fait aucun traitement. 
    116116   if (isNullHandle(*_hd) || (_hd->data_type != DTREATMENT)) return; 
    117117   DataTreatment * const __dt = (DataTreatment*)_hd->data_ptr; 
     
    128128} 
    129129 
     130/* ********************************************************** */ 
     131/*                      CONTEXT INTERFACE                     */ 
     132/* ********************************************************** */ 
     133 
     134void xios_context_set_current_(const XHandle * const _ctxt, const bool * const _wswap) 
     135{ 
     136   bool __wswap = (_wswap == NULL) ? false : *_wswap; 
     137   if (isNullHandle(*_ctxt) || (_ctxt->data_type != ECONTEXT)) return; 
     138 
     139   Context* const __ctxt = (Context*) _ctxt->data_ptr; 
     140   Context::SetCurrentContext(__ctxt->getId(), __wswap) ; 
     141} 
     142 
  • XMLIO_V2/dev/dev_rv/src/XMLIO/c_interface.hpp

    r132 r133  
    4444   /* ******************** HANDLE INTERFACE ******************** */ 
    4545   void xios_handle_create_ (XHandle * _ret, const XDType * const _dtype, XString _id); 
     46 
     47   /* 
    4648   void xios_handle_verify_ (XBool   * _ret, const XHandle * const _hd); 
    4749   void xios_handle_getType_(XDType  * _ret, const XHandle * const _hd); 
     
    5153   void xios_handle_isGroup_  (XBool * _ret, const XHandle * const _hd); 
    5254   void xios_handle_isElement_(XBool * _ret, const XHandle * const _hd); 
     55   */ 
    5356 
    5457   /* ******************** XML INTERFACE *********************** */ 
     
    6063   void xios_dtreatment_create_files_and_headers_(const XHandle * const _hd, const XFileType * const _ft); 
    6164 
    62    /* ******************** CALENDAR INTERFACE ****************** */ 
     65   /* ******************** CONTEXT INTERFACE ******************* */ 
     66   void xios_context_set_current_(const XHandle * const _ctxt, const bool * const _wswap); 
    6367 
    64    void xios_date_new_(XHandle * _dte, const XDate * const _xdate); 
    65    void xios_calendar_setTimeStep_(XHandle * _cal, const XDuration * const _dur); 
    6668 
    67    /* ******************** CONTEXT INTERFACE ******************* */ 
    68    void xios_context_SetCurrent_(const XHandle * const _ctxt); 
     69   /* 
    6970   void xios_context_GetCurrent_(XHandle * _ctxt); 
    7071   void xios_context_ShowTree_  (void); 
    7172 
    7273   void xios_context_getCalendar_(const XHandle * const _ctxt, XHandle* _cal); 
     74   */ 
    7375 
    7476   /* ******************** AXIS INTERFACE ********************** */ 
  • XMLIO_V2/dev/dev_rv/src/XMLIO/main.f90

    r132 r133  
    6565END MODULE IXML 
    6666 
     67MODULE ICONTEXT 
     68   IMPLICIT NONE 
     69   INTERFACE 
     70 
     71      SUBROUTINE xios_context_set_current(context, withswap) 
     72         USE XTYPE 
     73         TYPE(XHandle),     INTENT(IN)  :: context 
     74         LOGICAL, OPTIONAL, INTENT(IN)  :: withswap 
     75      END SUBROUTINE xios_context_set_current 
     76 
     77   END INTERFACE 
     78 
     79END MODULE ICONTEXT 
     80 
    6781MODULE IDATATREATMENT 
    6882   IMPLICIT NONE 
     
    88102   USE IXHANDLE 
    89103   USE IXML 
     104   USE ICONTEXT 
    90105   USE IDATATREATMENT 
    91106 
     
    107122   ! ----------- Début du traitement ----------- ! 
    108123 
     124   CALL xios_context_set_current(context1, .TRUE.) 
     125 
    109126   ! Création et initialisation d'une instance de traitement des données dans 'context1'. 
    110127   CALL xios_dtreatment_new(dtreat, context1) 
Note: See TracChangeset for help on using the changeset viewer.