xref: /AOO41X/main/autodoc/source/parser_i/inc/s2_dsapi/cx_dsapi.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_CX_DSAPI_HXX
25 #define ADC_CX_DSAPI_HXX
26 
27 // USED SERVICES
28     // BASE CLASSES
29 #include <tokens/tkpcont2.hxx>
30     // COMPONENTS
31 #include <cosv/tpl/dyn.hxx>
32 #include <tokens/tkpstam2.hxx>
33     // PARAMETERS
34 
35 
36 namespace csi
37 {
38 namespace dsapi
39 {
40 
41 class Token_Receiver;
42 class Token;
43 
44 class Cx_EoHtml;
45 class Cx_EoXmlConst;
46 class Cx_EoXmlLink_BeginTag;
47 class Cx_EoXmlLink_EndTag;
48 class Cx_EoXmlFormat_BeginTag;
49 class Cx_EoXmlFormat_EndTag;
50 class Cx_CheckStar;
51 
52 /**
53 @descr
54 */
55 class Context_Docu : public TkpDocuContext,
56                      private StateMachineContext
57 {
58   public:
59     //  LIFECYCLE
60                         Context_Docu(
61                             Token_Receiver &    o_rReceiver );
62     virtual void        SetParentContext(
63                             TkpContext &        io_rParentContext,
64                             const char *        i_sMultiLineEndToken );
65 
66                         ~Context_Docu();
67     //  OPERATIONS
68     virtual void        ReadCharChain(
69                             CharacterSource &   io_rText );
70 
71     virtual bool        PassNewToken();
72     virtual void        SetMode_IsMultiLine(
73                             bool                i_bTrue );
74 
75     //  INQUIRY
76     virtual TkpContext &
77                         FollowUpContext();
78   private:
79     //  SERVICE FUNCTIONS
80     virtual void        PerformStatusFunction(
81                             uintt               i_nStatusSignal,
82                             UINT16              i_nTokenId,
83                             CharacterSource &   io_rText );
84 
85     void                SetupStateMachine();
86 
87     //  DATA
88     StateMachin2        aStateMachine;
89     Token_Receiver *    pReceiver;
90 
91         // Contexts
92     TkpContext *        pParentContext;
93     String              sMultiLineEndToken;
94 
95     Dyn<Cx_EoHtml>      pCx_EoHtml;
96     Dyn<Cx_EoXmlConst>  pCx_EoXmlConst;
97     Dyn<Cx_EoXmlLink_BeginTag>
98                         pCx_EoXmlLink_BeginTag;
99     Dyn<Cx_EoXmlLink_EndTag>
100                         pCx_EoXmlLink_EndTag;
101     Dyn<Cx_EoXmlFormat_BeginTag>
102                         pCx_EoXmlFormat_BeginTag;
103     Dyn<Cx_EoXmlFormat_EndTag>
104                         pCx_EoXmlFormat_EndTag;
105     Dyn<Cx_CheckStar>   pCx_CheckStar;
106 
107         // Temporary data, used during ReadCharChain()
108     Dyn<Token>          pNewToken;
109     ::TkpContext *      pFollowUpContext;
110     bool                bIsMultiline;
111 };
112 
113 
114 }   // namespace dsapi
115 }   // namespace csi
116 
117 
118 #endif
119 
120