1 | #ifndef YearMonthDayBase_HPP__ |
2 | #define YearMonthDayBase_HPP__ |
3 | |
4 | /* Copyright (c) 2002,2003 CrystalClear Software, Inc. |
5 | * Use, modification and distribution is subject to the |
6 | * Boost Software License, Version 1.0. (See accompanying |
7 | * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) |
8 | * Author: Jeff Garland |
9 | * $Date$ |
10 | */ |
11 | |
12 | #include <boost/date_time/compiler_config.hpp> |
13 | |
14 | namespace boost { |
15 | namespace date_time { |
16 | |
17 | //! Allow rapid creation of ymd triples of different types |
18 | template<typename YearType, typename MonthType, typename DayType> |
19 | struct BOOST_SYMBOL_VISIBLE year_month_day_base { |
20 | year_month_day_base(YearType year, |
21 | MonthType month, |
22 | DayType day); |
23 | YearType year; |
24 | MonthType month; |
25 | DayType day; |
26 | typedef YearType year_type; |
27 | typedef MonthType month_type; |
28 | typedef DayType day_type; |
29 | }; |
30 | |
31 | |
32 | //! A basic constructor |
33 | template<typename YearType, typename MonthType, typename DayType> |
34 | inline |
35 | year_month_day_base<YearType,MonthType,DayType>::year_month_day_base(YearType y, |
36 | MonthType m, |
37 | DayType d) : |
38 | year(y), |
39 | month(m), |
40 | day(d) |
41 | {} |
42 | |
43 | } }//namespace date_time |
44 | |
45 | |
46 | #endif |
47 | |
48 | |