Ruby 1.9.3p327(2012-11-10revision37606)
ext/date/date_tmx.h
Go to the documentation of this file.
00001 #ifndef DATE_TMX_H
00002 #define DATE_TMX_H
00003 
00004 struct tmx_funcs {
00005     VALUE (*year)(void *dat);
00006     int (*yday)(void *dat);
00007     int (*mon)(void *dat);
00008     int (*mday)(void *dat);
00009     VALUE (*cwyear)(void *dat);
00010     int (*cweek)(void *dat);
00011     int (*cwday)(void *dat);
00012     int (*wnum0)(void *dat);
00013     int (*wnum1)(void *dat);
00014     int (*wday)(void *dat);
00015     int (*hour)(void *dat);
00016     int (*min)(void *dat);
00017     int (*sec)(void *dat);
00018     VALUE (*sec_fraction)(void *dat);
00019     VALUE (*secs)(void *dat);
00020     VALUE (*msecs)(void *dat);
00021     VALUE (*offset)(void *dat);
00022     char *(*zone)(void *dat);
00023 };
00024 struct tmx {
00025     void *dat;
00026     struct tmx_funcs *funcs;
00027 };
00028 
00029 #define tmx_attr(x) (tmx->funcs->x)(tmx->dat)
00030 
00031 #define tmx_year tmx_attr(year)
00032 #define tmx_yday tmx_attr(yday)
00033 #define tmx_mon tmx_attr(mon)
00034 #define tmx_mday tmx_attr(mday)
00035 #define tmx_cwyear tmx_attr(cwyear)
00036 #define tmx_cweek tmx_attr(cweek)
00037 #define tmx_cwday tmx_attr(cwday)
00038 #define tmx_wnum0 tmx_attr(wnum0)
00039 #define tmx_wnum1 tmx_attr(wnum1)
00040 #define tmx_wday tmx_attr(wday)
00041 #define tmx_hour tmx_attr(hour)
00042 #define tmx_min tmx_attr(min)
00043 #define tmx_sec tmx_attr(sec)
00044 #define tmx_sec_fraction tmx_attr(sec_fraction)
00045 #define tmx_secs tmx_attr(secs)
00046 #define tmx_msecs tmx_attr(msecs)
00047 #define tmx_offset tmx_attr(offset)
00048 #define tmx_zone tmx_attr(zone)
00049 
00050 #endif
00051 
00052 /*
00053 Local variables:
00054 c-file-style: "ruby"
00055 End:
00056 */
00057