xref: /AOO41X/main/autodoc/source/parser/cpp/pe_expr.hxx (revision 1c78a5d6c0093dece4c096ba53051800fbad6e33)
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_EXPR_HXX
26 #define ADC_CPP_PE_EXPR_HXX
27 
28 
29 
30 // USED SERVICES
31     // BASE CLASSES
32 #include "cpp_pe.hxx"
33     // COMPONENTS
34 #include <semantic/callf.hxx>
35 #include <semantic/sub_peu.hxx>
36     // PARAMETERS
37 
38 
39 namespace cpp {
40 
41 
42 class PE_Expression : public Cpp_PE
43 {
44   public:
45     enum E_State
46     {
47         std,
48         size_of_states
49     };
50                         PE_Expression(
51                             Cpp_PE *            i_pParent );
52                         ~PE_Expression();
53 
54     const char *        Result_Text() const;
55 
56     virtual void        Call_Handler(
57                             const cpp::Token &  i_rTok );
58 
59   private:
60     void                Setup_StatusFunctions();
61     virtual void        InitData();
62     virtual void        TransferData();
63     void                On_std_Default( const char *);
64 
65     void                On_std_SwBracket_Left( const char *);
66     void                On_std_SwBracket_Right( const char *);
67     void                On_std_ArrayBracket_Left( const char *);
68     void                On_std_ArrayBracket_Right( const char *);
69     void                On_std_Bracket_Left( const char *);
70     void                On_std_Bracket_Right( const char *);
71     void                On_std_Semicolon( const char *);
72     void                On_std_Comma( const char *);
73 
74     // DATA
75     Dyn< PeStatusArray<PE_Expression> >
76                         pStati;
77 
78     csv::StreamStr      aResult_Text;
79 
80     intt                nBracketCounter;
81 };
82 
83 
84 
85 // IMPLEMENTATION
86 
87 inline const char *
Result_Text() const88 PE_Expression::Result_Text() const
89 {
90     return aResult_Text.c_str();
91 }
92 
93 
94 }   // namespace cpp
95 
96 
97 
98 
99 #endif
100 
101 
102