Branch data Line data Source code
1 : : #ifndef INCLUDED_COM_SUN_STAR_UTIL_SORTFIELD_HPP
2 : : #define INCLUDED_COM_SUN_STAR_UTIL_SORTFIELD_HPP
3 : :
4 : : #include "sal/config.h"
5 : :
6 : : #include "com/sun/star/util/SortField.hdl"
7 : :
8 : : #include "com/sun/star/util/SortFieldType.hpp"
9 : : #include "com/sun/star/uno/Type.hxx"
10 : : #include "cppu/unotype.hxx"
11 : : #include "sal/types.h"
12 : : #include "typelib/typeclass.h"
13 : : #include "typelib/typedescription.h"
14 : :
15 : : namespace com { namespace sun { namespace star { namespace util {
16 : :
17 : 0 : inline SortField::SortField() SAL_THROW(())
18 : : : Field(0)
19 : : , SortAscending(false)
20 : 0 : , FieldType(::com::sun::star::util::SortFieldType_AUTOMATIC)
21 : : {
22 : 0 : }
23 : :
24 : : inline SortField::SortField(const ::sal_Int32& Field_, const ::sal_Bool& SortAscending_, const ::com::sun::star::util::SortFieldType& FieldType_) SAL_THROW(())
25 : : : Field(Field_)
26 : : , SortAscending(SortAscending_)
27 : : , FieldType(FieldType_)
28 : : {
29 : : }
30 : :
31 : : } } } }
32 : :
33 : : namespace com { namespace sun { namespace star { namespace util {
34 : :
35 : 1 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::com::sun::star::util::SortField const *) {
36 : : //TODO: On certain platforms with weak memory models, the following code can result in some threads observing that the_type points to garbage
37 : : static ::typelib_TypeDescriptionReference * the_type = 0;
38 [ + - ]: 1 : if (the_type == 0) {
39 : 1 : ::typelib_static_type_init(&the_type, typelib_TypeClass_STRUCT, "com.sun.star.util.SortField");
40 : : }
41 : 1 : return *reinterpret_cast< ::com::sun::star::uno::Type * >(&the_type);
42 : : }
43 : :
44 : : } } } }
45 : :
46 : : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::com::sun::star::util::SortField const *) SAL_THROW(()) {
47 : : return ::cppu::UnoType< ::com::sun::star::util::SortField >::get();
48 : : }
49 : :
50 : : #endif // INCLUDED_COM_SUN_STAR_UTIL_SORTFIELD_HPP
|