xref: /aoo4110/main/idlc/inc/idlc/aststruct.hxx (revision b1cdbd2c)
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 #ifndef _IDLC_ASTSTRUCT_HXX_
24 #define _IDLC_ASTSTRUCT_HXX_
25 
26 #include <idlc/asttype.hxx>
27 #include <idlc/astscope.hxx>
28 #include "idlc/idlctypes.hxx"
29 
30 class AstStruct;
31 typedef ::std::vector< AstStruct* > InheritedTypes;
32 
33 class AstStruct : public AstType
34 				, public AstScope
35 {
36 public:
37 	AstStruct(
38         const ::rtl::OString& name,
39         std::vector< rtl::OString > const & typeParameters,
40         AstStruct* pBaseType, AstScope* pScope);
41 
42 	AstStruct(const NodeType type,
43 			  const ::rtl::OString& name,
44 			  AstStruct* pBaseType,
45 			  AstScope* pScope);
46 	virtual ~AstStruct();
47 
getBaseType()48 	AstStruct* getBaseType()
49 		{ return m_pBaseType; }
50 
getTypeParameterCount() const51     DeclList::size_type getTypeParameterCount() const
52     { return m_typeParameters.size(); }
53 
54     AstDeclaration const * findTypeParameter(rtl::OString const & name) const;
55 
56     virtual bool isType() const;
57 
58 	virtual sal_Bool dump(RegistryKey& rKey);
59 private:
60 	AstStruct* m_pBaseType;
61     DeclList m_typeParameters;
62 };
63 
64 #endif // _IDLC_ASTSTRUCT_HXX_
65 
66