xref: /trunk/main/autodoc/source/parser/cpp/pe_base.hxx (revision 1c78a5d6)
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 
25 #ifndef ADC_CPP_PE_BASE_HXX
26 #define ADC_CPP_PE_BASE_HXX
27 
28 // BASE CLASSES
29 #include "cpp_pe.hxx"
30 // USED SERVICES
31 #include <semantic/callf.hxx>
32 #include <semantic/sub_peu.hxx>
33 #include <ary/cpp/c_types4cpp.hxx>
34 #include <ary/cpp/c_slntry.hxx>
35 
36 
37 
38 namespace cpp
39 {
40 
41 class PE_Type;
42 
43 class PE_Base : public Cpp_PE
44 {
45   public:
46 	enum E_State
47 	{
48 		startOfNext,
49 		inName,
50 		size_of_states
51 	};
52 
53 	typedef ary::cpp::List_Bases        BaseList;
54     typedef ary::cpp::S_Classes_Base    Base;
55 
56 						PE_Base(
57 							Cpp_PE *            i_pParent );
58 						~PE_Base();
59 
60 	const BaseList &	Result_BaseIds() const;
61 
62 	virtual void		Call_Handler(
63 							const cpp::Token &	i_rTok );
64 
65   private:
66 	typedef SubPe< PE_Base, PE_Type >		 	SP_Type;
67 	typedef SubPeUse< PE_Base, PE_Type> 		SPU_BaseName;
68 
69 	void				Setup_StatusFunctions();
70 	virtual void		InitData();
71 	virtual void		TransferData();
72 	void  				Hdl_SyntaxError( const char *);
73 
74 	void				SpReturn_BaseName();
75 
76 	void				On_startOfNext_Identifier(const char *);
77 	void				On_startOfNext_public(const char *);
78 	void				On_startOfNext_protected(const char *);
79 	void				On_startOfNext_private(const char *);
80 	void				On_startOfNext_virtual(const char *);
81 	void				On_startOfNext_DoubleColon(const char *);
82 
83 	void				On_inName_Identifier(const char *);
84 	void				On_inName_virtual(const char *);
85 	void				On_inName_SwBracket_Left(const char *);
86 	void				On_inName_DoubleColon(const char *);
87 	void				On_inName_Comma(const char *);
88 
89 	Base &				CurObject();
90 
91 	// DATA
92 	Dyn< PeStatusArray<PE_Base> >
93 						pStati;
94 
95 	Dyn<SP_Type>	    pSpType;      		/// till "{" incl.
96 	Dyn<SPU_BaseName> 	pSpuBaseName;
97 
98 	BaseList			aBaseIds;
99 };
100 
101 
102 
103 // IMPLEMENTATION
104 
105 inline const PE_Base::BaseList &
Result_BaseIds() const106 PE_Base::Result_BaseIds() const
107 	{ return aBaseIds; }
108 
109 
110 inline PE_Base::Base &
CurObject()111 PE_Base::CurObject()
112 	{ return aBaseIds.back(); }
113 
114 
115 
116 
117 
118 }   // namespace cpp
119 #endif
120