1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef INCLUDED_stoc_source_registry_tdprovider_structtypedescription_hxx
25 #define INCLUDED_stoc_source_registry_tdprovider_structtypedescription_hxx
26 
27 #include "com/sun/star/reflection/XPublished.hpp"
28 #include "com/sun/star/reflection/XStructTypeDescription.hpp"
29 #include "com/sun/star/uno/Reference.hxx"
30 #include "com/sun/star/uno/Sequence.hxx"
31 #include "cppuhelper/implbase2.hxx"
32 #include "rtl/ref.hxx"
33 #include "sal/types.h"
34 
35 namespace com { namespace sun { namespace star {
36     namespace container { class XHierarchicalNameAccess; }
37     namespace reflection { class XCompoundTypeDescription; }
38 } } }
39 namespace rtl { class OUString; }
40 namespace stoc_rdbtdp { class CompoundTypeDescriptionImpl; }
41 
42 namespace stoc { namespace registry_tdprovider {
43 
44 class StructTypeDescription:
45     public cppu::WeakImplHelper2<
46         com::sun::star::reflection::XStructTypeDescription,
47         com::sun::star::reflection::XPublished >
48 {
49 public:
50     StructTypeDescription(
51         com::sun::star::uno::Reference<
52             com::sun::star::container::XHierarchicalNameAccess > const &
53             manager,
54         rtl::OUString const & name, rtl::OUString const & baseTypeName,
55         com::sun::star::uno::Sequence< sal_Int8 > const & data, bool published);
56 
57     virtual ~StructTypeDescription();
58 
59     virtual com::sun::star::uno::TypeClass SAL_CALL getTypeClass()
60         throw (com::sun::star::uno::RuntimeException);
61 
62     virtual rtl::OUString SAL_CALL getName()
63         throw (com::sun::star::uno::RuntimeException);
64 
65     virtual
66     com::sun::star::uno::Reference<
67         com::sun::star::reflection::XTypeDescription >
68     SAL_CALL getBaseType() throw (com::sun::star::uno::RuntimeException);
69 
70     virtual
71     com::sun::star::uno::Sequence<
72         com::sun::star::uno::Reference<
73             com::sun::star::reflection::XTypeDescription > >
74     SAL_CALL getMemberTypes() throw (com::sun::star::uno::RuntimeException);
75 
76     virtual com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL
77     getMemberNames() throw (com::sun::star::uno::RuntimeException);
78 
79     virtual com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL
80     getTypeParameters() throw (com::sun::star::uno::RuntimeException);
81 
82     virtual
83     com::sun::star::uno::Sequence<
84         com::sun::star::uno::Reference<
85             com::sun::star::reflection::XTypeDescription > >
86     SAL_CALL getTypeArguments() throw (com::sun::star::uno::RuntimeException);
87 
88     virtual sal_Bool SAL_CALL isPublished()
89         throw (com::sun::star::uno::RuntimeException);
90 
91 private:
92     StructTypeDescription(StructTypeDescription &); // not implemented
93     void operator =(StructTypeDescription); // not implemented
94 
95     com::sun::star::uno::Sequence< sal_Int8 > m_data;
96     rtl::Reference< stoc_rdbtdp::CompoundTypeDescriptionImpl > m_base;
97 };
98 
99 } }
100 
101 #endif
102