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 ADC_CPP_PE_TPLTP_HXX
25 #define ADC_CPP_PE_TPLTP_HXX
26 
27 
28 
29 // USED SERVICES
30 	// BASE CLASSES
31 #include "cpp_pe.hxx"
32 	// COMPONENTS
33 #include <semantic/callf.hxx>
34 #include <semantic/sub_peu.hxx>
35 	// PARAMETERS
36 
37 
38 namespace cpp {
39 
40 
41 
42 class PE_TemplateTop : public cpp::Cpp_PE
43 {
44   public:
45 	enum E_State
46 	{
47         start,
48         expect_qualifier,
49         expect_name,
50         expect_separator,
51 		size_of_states
52 	};
53 						PE_TemplateTop(
54                             Cpp_PE *			i_pParent );
55 						~PE_TemplateTop();
56 
57     const StringVector &
58                         Result_Parameters() const;
59 
60 	virtual void		Call_Handler(
61 							const cpp::Token &	i_rTok );
62   private:
63 	void				Setup_StatusFunctions();
64 	virtual void		InitData();
65 	virtual void		TransferData();
66 	void				Hdl_SyntaxError(const char *);
67 
68 
69     void				On_start_Less(const char *);
70 
71 	void				On_expect_qualifier_ClassOrTypename(const char *);
72     void				On_expect_qualifier_Greater(const char *);
73 	void				On_expect_qualifier_Other(const char *);
74 
75 	void				On_expect_name_Identifier(const char *);
76 
77 	void				On_expect_separator_Comma(const char *);
78     void				On_expect_separator_Greater(const char *);
79 
80 	// DATA
81 	Dyn< PeStatusArray<PE_TemplateTop> >
82 						pStati;
83 
84     StringVector
85                         aResult_Parameters;
86     bool                bCurIsConstant;
87 };
88 
89 
90 
91 // IMPLEMENTATION
92 
93 inline const StringVector &
Result_Parameters() const94 PE_TemplateTop::Result_Parameters() const
95     { return aResult_Parameters; }
96 
97 
98 }   // namespace cpp
99 
100 
101 #endif
102 
103