xref: /AOO41X/main/autodoc/source/parser/inc/adoc/cx_a_std.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_ADOC_CX_A_STD_HXX
25 #define ADC_ADOC_CX_A_STD_HXX
26 
27 // USED SERVICES
28     // BASE CLASSES
29 #include <tokens/tkpcontx.hxx>
30     // COMPONENTS
31 #include <tokens/tkpstama.hxx>
32     // PARAMETERS
33 
34 class TextToken;
35 
36 
37 namespace adoc {
38 
39 class Cx_LineStart;
40 class Cx_CheckStar;
41 class Cx_AtTagCompletion;
42 
43 
44 /**
45 @descr
46 */
47 class Context_AdocStd : public autodoc::TkpDocuContext,
48                         private StateMachineContext
49 {
50   public:
51     //  LIFECYCLE
52                         Context_AdocStd();
53     virtual void        SetParentContext(
54                             TkpContext &        io_rParentContext,
55                             const char *        i_sMultiLineEndToken );
56                         ~Context_AdocStd();
57 
58     //  OPERATIONS
59     virtual void        AssignDealer(
60                             TokenDealer &       o_rDealer );
61 
62     virtual void        ReadCharChain(
63                             CharacterSource &   io_rText );
64     virtual bool        PassNewToken();
65     virtual void        SetMode_IsMultiLine(
66                             bool                i_bTrue );
67     //  INQUIRY
68     virtual TkpContext &
69                         FollowUpContext();
70   private:
71     //  SERVICE FUNCTIONS
72     virtual void        PerformStatusFunction(
73                             uintt               i_nStatusSignal,
74                             F_CRTOK             i_fTokenCreateFunction,
75                             CharacterSource &   io_rText );
76 
77     void                SetupStateMachine();
78 
79     //  DATA
80     StateMachine        aStateMachine;
81     TokenDealer *       pDealer;
82 
83         // Contexts
84     TkpContext *        pParentContext;
85     TkpContext *        pFollowUpContext;
86     Dyn<Cx_LineStart>   pCx_LineStart;
87     Dyn<Cx_CheckStar>   pCx_CheckStar;
88     Dyn<Cx_AtTagCompletion>
89                         pCx_AtTagCompletion;
90 
91         // Temporary data, used during ReadCharChain()
92     Dyn<TextToken>      pNewToken;
93     bool                bIsMultiline;
94 };
95 
96 
97 }   // namespace adoc
98 
99 
100 #endif
101 
102