Ruby  1.9.3p551(2014-11-13revision48407)
date_tmx.h
Go to the documentation of this file.
1 #ifndef DATE_TMX_H
2 #define DATE_TMX_H
3 
4 struct tmx_funcs {
5  VALUE (*year)(void *dat);
6  int (*yday)(void *dat);
7  int (*mon)(void *dat);
8  int (*mday)(void *dat);
9  VALUE (*cwyear)(void *dat);
10  int (*cweek)(void *dat);
11  int (*cwday)(void *dat);
12  int (*wnum0)(void *dat);
13  int (*wnum1)(void *dat);
14  int (*wday)(void *dat);
15  int (*hour)(void *dat);
16  int (*min)(void *dat);
17  int (*sec)(void *dat);
18  VALUE (*sec_fraction)(void *dat);
19  VALUE (*secs)(void *dat);
20  VALUE (*msecs)(void *dat);
21  VALUE (*offset)(void *dat);
22  char *(*zone)(void *dat);
23 };
24 struct tmx {
25  void *dat;
26  struct tmx_funcs *funcs;
27 };
28 
29 #define tmx_attr(x) (tmx->funcs->x)(tmx->dat)
30 
31 #define tmx_year tmx_attr(year)
32 #define tmx_yday tmx_attr(yday)
33 #define tmx_mon tmx_attr(mon)
34 #define tmx_mday tmx_attr(mday)
35 #define tmx_cwyear tmx_attr(cwyear)
36 #define tmx_cweek tmx_attr(cweek)
37 #define tmx_cwday tmx_attr(cwday)
38 #define tmx_wnum0 tmx_attr(wnum0)
39 #define tmx_wnum1 tmx_attr(wnum1)
40 #define tmx_wday tmx_attr(wday)
41 #define tmx_hour tmx_attr(hour)
42 #define tmx_min tmx_attr(min)
43 #define tmx_sec tmx_attr(sec)
44 #define tmx_sec_fraction tmx_attr(sec_fraction)
45 #define tmx_secs tmx_attr(secs)
46 #define tmx_msecs tmx_attr(msecs)
47 #define tmx_offset tmx_attr(offset)
48 #define tmx_zone tmx_attr(zone)
49 
50 #endif
51 
52 /*
53 Local variables:
54 c-file-style: "ruby"
55 End:
56 */
57