xref: /AOO41X/main/autodoc/source/parser/cpp/cx_c_pp.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 #ifndef ADC_CPP_CX_C_PP_HXX
25 #define ADC_CPP_CX_C_PP_HXX
26 
27 // USED SERVICES
28     // BASE CLASSES
29 #include <tokens/tkpcontx.hxx>
30 #include "cx_base.hxx"
31     // COMPONENTS
32     // PARAMETERS
33 
34 
35 namespace cpp
36 {
37 
38 class Context_Preprocessor : public Cx_Base
39 {
40   public:
41                         Context_Preprocessor(
42                             TkpContext &        i_rFollowUpContext );
43     virtual void        ReadCharChain(
44                             CharacterSource &   io_rText );
45     virtual void        AssignDealer(
46                             Distributor &       o_rDealer );
47   private:
48     // Locals
49     void                ReadDefault(
50                             CharacterSource &   io_rText );
51     void                ReadDefine(
52                             CharacterSource &   io_rText );
53 
54     // DATA
55     TkpContext *        pContext_Parent;
56     Dyn<Cx_Base>        pContext_PP_MacroParams;
57     Dyn<Cx_Base>        pContext_PP_Definition;
58 };
59 
60 class Context_PP_MacroParams : public Cx_Base
61 {
62   public:
63                         Context_PP_MacroParams(
64                             Cx_Base &           i_rFollowUpContext );
65 
66     virtual void        ReadCharChain(
67                             CharacterSource &   io_rText );
68   private:
69     // DATA
70     Cx_Base *           pContext_PP_Definition;
71 };
72 
73 class Context_PP_Definition : public Cx_Base
74 {
75   public:
76                         Context_PP_Definition(
77                             TkpContext &        i_rFollowUpContext );
78 
79     virtual void        ReadCharChain(
80                             CharacterSource &   io_rText );
81 
82   private:
83     // DATA
84     TkpContext *        pContext_Parent;
85 };
86 
87 
88 }   // namespace cpp
89 
90 #endif
91 
92