Branch data Line data Source code
1 : : #ifndef INCLUDED_COM_SUN_STAR_UTIL_DATETIME_HPP
2 : : #define INCLUDED_COM_SUN_STAR_UTIL_DATETIME_HPP
3 : :
4 : : #include "sal/config.h"
5 : :
6 : : #include "com/sun/star/util/DateTime.hdl"
7 : :
8 : : #include "com/sun/star/uno/Type.hxx"
9 : : #include "cppu/unotype.hxx"
10 : : #include "sal/types.h"
11 : : #include "typelib/typeclass.h"
12 : : #include "typelib/typedescription.h"
13 : :
14 : : namespace com { namespace sun { namespace star { namespace util {
15 : :
16 : 76829 : inline DateTime::DateTime() SAL_THROW(())
17 : : : HundredthSeconds(0)
18 : : , Seconds(0)
19 : : , Minutes(0)
20 : : , Hours(0)
21 : : , Day(0)
22 : : , Month(0)
23 : 76829 : , Year(0)
24 : : {
25 : 76829 : }
26 : :
27 : 2328 : inline DateTime::DateTime(const ::sal_uInt16& HundredthSeconds_, const ::sal_uInt16& Seconds_, const ::sal_uInt16& Minutes_, const ::sal_uInt16& Hours_, const ::sal_uInt16& Day_, const ::sal_uInt16& Month_, const ::sal_uInt16& Year_) SAL_THROW(())
28 : : : HundredthSeconds(HundredthSeconds_)
29 : : , Seconds(Seconds_)
30 : : , Minutes(Minutes_)
31 : : , Hours(Hours_)
32 : : , Day(Day_)
33 : : , Month(Month_)
34 : 2328 : , Year(Year_)
35 : : {
36 : 2328 : }
37 : :
38 : : } } } }
39 : :
40 : : namespace com { namespace sun { namespace star { namespace util {
41 : :
42 : 61081 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::com::sun::star::util::DateTime const *) {
43 : : //TODO: On certain platforms with weak memory models, the following code can result in some threads observing that the_type points to garbage
44 : : static ::typelib_TypeDescriptionReference * the_type = 0;
45 [ + + ]: 61081 : if (the_type == 0) {
46 : 474 : ::typelib_static_type_init(&the_type, typelib_TypeClass_STRUCT, "com.sun.star.util.DateTime");
47 : : }
48 : 61081 : return *reinterpret_cast< ::com::sun::star::uno::Type * >(&the_type);
49 : : }
50 : :
51 : : } } } }
52 : :
53 : 2691 : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::com::sun::star::util::DateTime const *) SAL_THROW(()) {
54 : 2691 : return ::cppu::UnoType< ::com::sun::star::util::DateTime >::get();
55 : : }
56 : :
57 : : #endif // INCLUDED_COM_SUN_STAR_UTIL_DATETIME_HPP
|