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_SUB_HXX
25 #define ADC_ADOC_CX_A_SUB_HXX
26 
27 // USED SERVICES
28 	// BASE CLASSES
29 #include <tokens/tkpcontx.hxx>
30 	// COMPONENTS
31 #include <tokens/tkpstama.hxx>
32 	// PARAMETERS
33 #include <tokens/token.hxx>
34 
35 
36 namespace adoc {
37 
38 
39 
40 
41 class Cx_LineStart : public TkpContext
42 {
43   public:
44 						Cx_LineStart(
45 							TkpContext &		i_rFollowUpContext );
46 
47 	virtual void		ReadCharChain(
48 							CharacterSource &	io_rText );
49 	virtual bool		PassNewToken();
50 	virtual TkpContext &
51 						FollowUpContext();
52 
SetCurToken(TextToken::F_CRTOK i_fTokenCreateFunction)53 	void				SetCurToken(
54 							TextToken::F_CRTOK	i_fTokenCreateFunction )
55 												{ fCur_TokenCreateFunction = i_fTokenCreateFunction; }
AssignDealer(TokenDealer & o_rDealer)56     void                AssignDealer(
57 							TokenDealer &	    o_rDealer )
58                                                 { pDealer = &o_rDealer; }
59   private:
60 	// DATA
61 	TokenDealer *		pDealer;
62 	TkpContext *		pFollowUpContext;
63 
64 	Dyn<TextToken>		pNewToken;
65 
66 	TextToken::F_CRTOK	fCur_TokenCreateFunction;
67 };
68 
69 
70 /**
71 @descr
72 */
73 
74 class Cx_CheckStar : public TkpContext
75 {
76   public:
77 	// LIFECYCLE
78 						Cx_CheckStar(
79 							TkpContext &		i_rFollowUpContext );
Set_End_FollowUpContext(TkpContext & i_rEnd_FollowUpContext)80 	void				Set_End_FollowUpContext(
81 							TkpContext &		i_rEnd_FollowUpContext )
82 												{ pEnd_FollowUpContext = &i_rEnd_FollowUpContext; }
83 
84 	virtual void		ReadCharChain(
85 							CharacterSource &	io_rText );
86 	virtual bool		PassNewToken();
87 
SetCanBeEnd(bool i_bCanBeEnd)88 	void				SetCanBeEnd(
89 							bool 				i_bCanBeEnd  )
90 												{ bCanBeEnd = i_bCanBeEnd; }
91 	virtual TkpContext &
92 						FollowUpContext();
AssignDealer(TokenDealer & o_rDealer)93     void                AssignDealer(
94 							TokenDealer &	    o_rDealer )
95                                                 { pDealer = &o_rDealer; }
96   private:
97 	// DATA
98 	TokenDealer *		pDealer;
99 	TkpContext *		pFollowUpContext;
100 	TkpContext *		pEnd_FollowUpContext;
101 
102     Dyn<TextToken>		pNewToken;
103 
104 	bool				bCanBeEnd;
105 	bool				bEndTokenFound;
106 };
107 
108 
109 class Cx_AtTagCompletion : public TkpContext
110 {
111   public:
112 						Cx_AtTagCompletion(
113 							TkpContext &		i_rFollowUpContext );
114 
115 	virtual void		ReadCharChain(
116 							CharacterSource &	io_rText );
117 	virtual bool		PassNewToken();
118 	virtual TkpContext &
119 						FollowUpContext();
120 
SetCurToken(TextToken::F_CRTOK i_fTokenCreateFunction)121 	void				SetCurToken(
122 							TextToken::F_CRTOK	i_fTokenCreateFunction )
123 												{ fCur_TokenCreateFunction = i_fTokenCreateFunction; }
AssignDealer(TokenDealer & o_rDealer)124     void                AssignDealer(
125 							TokenDealer &	    o_rDealer )
126                                                 { pDealer = &o_rDealer; }
127   private:
128 	// DATA
129 	TokenDealer *		pDealer;
130 	TkpContext *		pFollowUpContext;
131 
132     Dyn<TextToken>		pNewToken;
133 
134 	TextToken::F_CRTOK	fCur_TokenCreateFunction;
135 };
136 
137 
138 }   // namespace adoc
139 
140 
141 #endif
142 
143