Changeset 526 for XIOS/trunk/src/config


Ignore:
Timestamp:
12/02/14 15:18:09 (9 years ago)
Author:
rlacroix
Message:

Convert some attributes to enumerations:

  • file: par_access
  • context: calendar_type

Those changes should have no effect on existing XML configuration files and ensure that a proper error message is always displayed during parsing if the value is not supported.

Location:
XIOS/trunk/src/config
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/config/calendar_type.conf

    r501 r526  
    11#ifdef __XMLIO_CAllLeapCalendar__ 
    2    DECLARE_CALENDAR(AllLeap  , AllLeap) 
     2   DECLARE_CALENDAR(AllLeap, calendar_type_attr::AllLeap) 
    33#endif //__XMLIO_CAllLeapCalendar__ 
    44 
    55#ifdef __XMLIO_CD360Calendar__ 
    6    DECLARE_CALENDAR(D360  , D360) 
     6   DECLARE_CALENDAR(D360, calendar_type_attr::D360) 
    77#endif //__XMLIO_CD360Calendar__ 
    88 
    99#ifdef __XMLIO_CGregorianCalendar__ 
    10    DECLARE_CALENDAR(Gregorian  , Gregorian) 
     10   DECLARE_CALENDAR(Gregorian, calendar_type_attr::Gregorian) 
    1111#endif //__XMLIO_CGregorianCalendar__ 
    1212 
    1313#ifdef __XMLIO_CJulianCalendar__ 
    14    DECLARE_CALENDAR(Julian  , Julian) 
     14   DECLARE_CALENDAR(Julian, calendar_type_attr::Julian) 
    1515#endif //__XMLIO_CJulianCalendar__ 
    1616 
    1717#ifdef __XMLIO_CNoLeapCalendar__ 
    18    DECLARE_CALENDAR(NoLeap  , NoLeap) 
     18   DECLARE_CALENDAR(NoLeap, calendar_type_attr::NoLeap) 
    1919#endif //__XMLIO_CNoLeapCalendar__ 
    20  
    21 #undef DECLARE_CALENDAR 
  • XIOS/trunk/src/config/context_attribute.conf

    r501 r526  
    1 DECLARE_ATTRIBUTE(StdString, calendar_type) 
     1DECLARE_ENUM5(calendar_type, D360, AllLeap, NoLeap, Julian, Gregorian) 
    22DECLARE_ATTRIBUTE(StdString, start_date) 
    33DECLARE_ATTRIBUTE(StdString, time_origin) 
  • XIOS/trunk/src/config/file_attribute.conf

    r517 r526  
    1313DECLARE_ENUM2(type,one_file,multiple_file) 
    1414DECLARE_ENUM2(format, netcdf4, netcdf4_classic) 
    15 DECLARE_ATTRIBUTE(StdString,      par_access) 
     15DECLARE_ENUM2(par_access, collective, independent) 
    1616 
    1717// DECLARE_ATTRIBUTE_DEF(bool, enabled, true) 
Note: See TracChangeset for help on using the changeset viewer.