xref: /trunk/main/autodoc/source/parser/inc/adoc/cx_a_sub.hxx (revision 914d351e5f5b84e4342a86d6ab8d4aca7308b9bd)
1*1c78a5d6SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*1c78a5d6SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*1c78a5d6SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*1c78a5d6SAndrew Rist  * distributed with this work for additional information
6*1c78a5d6SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*1c78a5d6SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*1c78a5d6SAndrew Rist  * "License"); you may not use this file except in compliance
9*1c78a5d6SAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11*1c78a5d6SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13*1c78a5d6SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*1c78a5d6SAndrew Rist  * software distributed under the License is distributed on an
15*1c78a5d6SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*1c78a5d6SAndrew Rist  * KIND, either express or implied.  See the License for the
17*1c78a5d6SAndrew Rist  * specific language governing permissions and limitations
18*1c78a5d6SAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20*1c78a5d6SAndrew Rist  *************************************************************/
21*1c78a5d6SAndrew Rist 
22*1c78a5d6SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef ADC_ADOC_CX_A_SUB_HXX
25cdf0e10cSrcweir #define ADC_ADOC_CX_A_SUB_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir // USED SERVICES
28cdf0e10cSrcweir     // BASE CLASSES
29cdf0e10cSrcweir #include <tokens/tkpcontx.hxx>
30cdf0e10cSrcweir     // COMPONENTS
31cdf0e10cSrcweir #include <tokens/tkpstama.hxx>
32cdf0e10cSrcweir     // PARAMETERS
33cdf0e10cSrcweir #include <tokens/token.hxx>
34cdf0e10cSrcweir 
35cdf0e10cSrcweir 
36cdf0e10cSrcweir namespace adoc {
37cdf0e10cSrcweir 
38cdf0e10cSrcweir 
39cdf0e10cSrcweir 
40cdf0e10cSrcweir 
41cdf0e10cSrcweir class Cx_LineStart : public TkpContext
42cdf0e10cSrcweir {
43cdf0e10cSrcweir   public:
44cdf0e10cSrcweir                         Cx_LineStart(
45cdf0e10cSrcweir                             TkpContext &        i_rFollowUpContext );
46cdf0e10cSrcweir 
47cdf0e10cSrcweir     virtual void        ReadCharChain(
48cdf0e10cSrcweir                             CharacterSource &   io_rText );
49cdf0e10cSrcweir     virtual bool        PassNewToken();
50cdf0e10cSrcweir     virtual TkpContext &
51cdf0e10cSrcweir                         FollowUpContext();
52cdf0e10cSrcweir 
SetCurToken(TextToken::F_CRTOK i_fTokenCreateFunction)53cdf0e10cSrcweir     void                SetCurToken(
54cdf0e10cSrcweir                             TextToken::F_CRTOK  i_fTokenCreateFunction )
55cdf0e10cSrcweir                                                 { fCur_TokenCreateFunction = i_fTokenCreateFunction; }
AssignDealer(TokenDealer & o_rDealer)56cdf0e10cSrcweir     void                AssignDealer(
57cdf0e10cSrcweir                             TokenDealer &       o_rDealer )
58cdf0e10cSrcweir                                                 { pDealer = &o_rDealer; }
59cdf0e10cSrcweir   private:
60cdf0e10cSrcweir     // DATA
61cdf0e10cSrcweir     TokenDealer *       pDealer;
62cdf0e10cSrcweir     TkpContext *        pFollowUpContext;
63cdf0e10cSrcweir 
64cdf0e10cSrcweir     Dyn<TextToken>      pNewToken;
65cdf0e10cSrcweir 
66cdf0e10cSrcweir     TextToken::F_CRTOK  fCur_TokenCreateFunction;
67cdf0e10cSrcweir };
68cdf0e10cSrcweir 
69cdf0e10cSrcweir 
70cdf0e10cSrcweir /**
71cdf0e10cSrcweir @descr
72cdf0e10cSrcweir */
73cdf0e10cSrcweir 
74cdf0e10cSrcweir class Cx_CheckStar : public TkpContext
75cdf0e10cSrcweir {
76cdf0e10cSrcweir   public:
77cdf0e10cSrcweir     // LIFECYCLE
78cdf0e10cSrcweir                         Cx_CheckStar(
79cdf0e10cSrcweir                             TkpContext &        i_rFollowUpContext );
Set_End_FollowUpContext(TkpContext & i_rEnd_FollowUpContext)80cdf0e10cSrcweir     void                Set_End_FollowUpContext(
81cdf0e10cSrcweir                             TkpContext &        i_rEnd_FollowUpContext )
82cdf0e10cSrcweir                                                 { pEnd_FollowUpContext = &i_rEnd_FollowUpContext; }
83cdf0e10cSrcweir 
84cdf0e10cSrcweir     virtual void        ReadCharChain(
85cdf0e10cSrcweir                             CharacterSource &   io_rText );
86cdf0e10cSrcweir     virtual bool        PassNewToken();
87cdf0e10cSrcweir 
SetCanBeEnd(bool i_bCanBeEnd)88cdf0e10cSrcweir     void                SetCanBeEnd(
89cdf0e10cSrcweir                             bool                i_bCanBeEnd  )
90cdf0e10cSrcweir                                                 { bCanBeEnd = i_bCanBeEnd; }
91cdf0e10cSrcweir     virtual TkpContext &
92cdf0e10cSrcweir                         FollowUpContext();
AssignDealer(TokenDealer & o_rDealer)93cdf0e10cSrcweir     void                AssignDealer(
94cdf0e10cSrcweir                             TokenDealer &       o_rDealer )
95cdf0e10cSrcweir                                                 { pDealer = &o_rDealer; }
96cdf0e10cSrcweir   private:
97cdf0e10cSrcweir     // DATA
98cdf0e10cSrcweir     TokenDealer *       pDealer;
99cdf0e10cSrcweir     TkpContext *        pFollowUpContext;
100cdf0e10cSrcweir     TkpContext *        pEnd_FollowUpContext;
101cdf0e10cSrcweir 
102cdf0e10cSrcweir     Dyn<TextToken>      pNewToken;
103cdf0e10cSrcweir 
104cdf0e10cSrcweir     bool                bCanBeEnd;
105cdf0e10cSrcweir     bool                bEndTokenFound;
106cdf0e10cSrcweir };
107cdf0e10cSrcweir 
108cdf0e10cSrcweir 
109cdf0e10cSrcweir class Cx_AtTagCompletion : public TkpContext
110cdf0e10cSrcweir {
111cdf0e10cSrcweir   public:
112cdf0e10cSrcweir                         Cx_AtTagCompletion(
113cdf0e10cSrcweir                             TkpContext &        i_rFollowUpContext );
114cdf0e10cSrcweir 
115cdf0e10cSrcweir     virtual void        ReadCharChain(
116cdf0e10cSrcweir                             CharacterSource &   io_rText );
117cdf0e10cSrcweir     virtual bool        PassNewToken();
118cdf0e10cSrcweir     virtual TkpContext &
119cdf0e10cSrcweir                         FollowUpContext();
120cdf0e10cSrcweir 
SetCurToken(TextToken::F_CRTOK i_fTokenCreateFunction)121cdf0e10cSrcweir     void                SetCurToken(
122cdf0e10cSrcweir                             TextToken::F_CRTOK  i_fTokenCreateFunction )
123cdf0e10cSrcweir                                                 { fCur_TokenCreateFunction = i_fTokenCreateFunction; }
AssignDealer(TokenDealer & o_rDealer)124cdf0e10cSrcweir     void                AssignDealer(
125cdf0e10cSrcweir                             TokenDealer &       o_rDealer )
126cdf0e10cSrcweir                                                 { pDealer = &o_rDealer; }
127cdf0e10cSrcweir   private:
128cdf0e10cSrcweir     // DATA
129cdf0e10cSrcweir     TokenDealer *       pDealer;
130cdf0e10cSrcweir     TkpContext *        pFollowUpContext;
131cdf0e10cSrcweir 
132cdf0e10cSrcweir     Dyn<TextToken>      pNewToken;
133cdf0e10cSrcweir 
134cdf0e10cSrcweir     TextToken::F_CRTOK  fCur_TokenCreateFunction;
135cdf0e10cSrcweir };
136cdf0e10cSrcweir 
137cdf0e10cSrcweir 
138cdf0e10cSrcweir }   // namespace adoc
139cdf0e10cSrcweir 
140cdf0e10cSrcweir 
141cdf0e10cSrcweir #endif
142