1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: tdmgr_tdenumeration.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _STOC_TDMGR_TDENUMERATION_HXX
32 #define _STOC_TDMGR_TDENUMERATION_HXX
35 #include <osl/mutex.hxx>
36 #include <com/sun/star/reflection/XTypeDescriptionEnumeration.hpp>
37 #include <com/sun/star/reflection/XTypeDescriptionEnumerationAccess.hpp>
38 #include <cppuhelper/implbase1.hxx>
43 typedef std::stack
< com::sun::star::uno::Reference
<
44 com::sun::star::reflection::XTypeDescriptionEnumerationAccess
> >
45 TDEnumerationAccessStack
;
47 class TypeDescriptionEnumerationImpl
48 : public cppu::WeakImplHelper1
<
49 com::sun::star::reflection::XTypeDescriptionEnumeration
>
52 TypeDescriptionEnumerationImpl(
53 const rtl::OUString
& rModuleName
,
54 const com::sun::star::uno::Sequence
<
55 com::sun::star::uno::TypeClass
> & rTypes
,
56 com::sun::star::reflection::TypeDescriptionSearchDepth eDepth
,
57 const TDEnumerationAccessStack
& rTDEAS
);
58 virtual ~TypeDescriptionEnumerationImpl();
60 // XEnumeration (base of XTypeDescriptionEnumeration)
61 virtual sal_Bool SAL_CALL
hasMoreElements()
62 throw ( ::com::sun::star::uno::RuntimeException
);
63 virtual ::com::sun::star::uno::Any SAL_CALL
nextElement()
64 throw ( ::com::sun::star::container::NoSuchElementException
,
65 ::com::sun::star::lang::WrappedTargetException
,
66 ::com::sun::star::uno::RuntimeException
);
68 // XTypeDescriptionEnumeration
69 virtual ::com::sun::star::uno::Reference
<
70 ::com::sun::star::reflection::XTypeDescription
> SAL_CALL
72 throw ( ::com::sun::star::container::NoSuchElementException
,
73 ::com::sun::star::uno::RuntimeException
);
76 com::sun::star::uno::Reference
<
77 com::sun::star::reflection::XTypeDescriptionEnumeration
>
78 queryCurrentChildEnumeration();
81 rtl::OUString m_aModuleName
;
82 com::sun::star::uno::Sequence
< com::sun::star::uno::TypeClass
> m_aTypes
;
83 com::sun::star::reflection::TypeDescriptionSearchDepth m_eDepth
;
84 TDEnumerationAccessStack m_aChildren
;
85 com::sun::star::uno::Reference
<
86 com::sun::star::reflection::XTypeDescriptionEnumeration
> m_xEnum
;
89 } // namespace stoc_tdmgr
91 #endif /* _STOC_TDMGR_TDENUMERATION_HXX */