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_LUIDL_CX_SUB_HXX
25 #define ADC_LUIDL_CX_SUB_HXX
26 
27 // USED SERVICES
28 	// BASE CLASSES
29 #include <tokens/tkpcont2.hxx>
30 	// COMPONENTS
31 	// PARAMETERS
32 
33 #include "uidl_tok.hxx"
34 
35 namespace csi
36 {
37 namespace uidl
38 {
39 
40 class Token_Receiver;
41 class Token;
42 
43 
44 class Cx_Base : public ::TkpContext
45 {
46   public:
47 	virtual bool		PassNewToken();
48 	virtual TkpContext &
49 						FollowUpContext();
50   protected:
51 	// LIFECYCLE
Cx_Base(Token_Receiver & o_rReceiver,TkpContext & i_rFollowUpContext)52 						Cx_Base(
53 							Token_Receiver &	o_rReceiver,
54 							TkpContext &		i_rFollowUpContext )
55 												: 	rReceiver(o_rReceiver),
56 												    pFollowUpContext(&i_rFollowUpContext),
57 												    pNewToken()
58 													{}
59   protected:
SetToken(DYN Token * let_dpToken)60 	void				SetToken(
61 							DYN Token *			let_dpToken )
62 												{ pNewToken = let_dpToken; }
Receiver()63     Token_Receiver &	Receiver()              { return rReceiver; }
64 
65   private:
66 	// DATA
67 	Token_Receiver &	rReceiver;
68 	TkpContext *		pFollowUpContext;
69 	Dyn<Token>			pNewToken;
70 };
71 
72 
73 
74 /**
75 @descr
76 */
77 
78 class Context_MLComment : public Cx_Base
79 {
80   public:
Context_MLComment(Token_Receiver & o_rReceiver,TkpContext & i_rFollowUpContext)81 						Context_MLComment(
82 							Token_Receiver &	o_rReceiver,
83 							TkpContext &		i_rFollowUpContext )
84 												: 	Cx_Base(o_rReceiver, i_rFollowUpContext) {}
85 	virtual void		ReadCharChain(
86 							CharacterSource &	io_rText );
87 };
88 
89 class Context_SLComment : public Cx_Base
90 {
91   public:
Context_SLComment(Token_Receiver & o_rReceiver,TkpContext & i_rFollowUpContext)92 						Context_SLComment(
93 							Token_Receiver &	o_rReceiver,
94 							TkpContext &		i_rFollowUpContext )
95 												: 	Cx_Base(o_rReceiver, i_rFollowUpContext) {}
96 	virtual void		ReadCharChain(
97 							CharacterSource &	io_rText );
98 };
99 
100 class Context_Praeprocessor : public Cx_Base
101 {
102   public:
Context_Praeprocessor(Token_Receiver & o_rReceiver,TkpContext & i_rFollowUpContext)103 						Context_Praeprocessor(
104 							Token_Receiver &	o_rReceiver,
105 							TkpContext &		i_rFollowUpContext )
106 												: 	Cx_Base(o_rReceiver, i_rFollowUpContext) {}
107 	virtual void		ReadCharChain(
108 							CharacterSource &	io_rText );
109 };
110 
111 class Context_Assignment : public Cx_Base
112 {
113   public:
Context_Assignment(Token_Receiver & o_rReceiver,TkpContext & i_rFollowUpContext)114 						Context_Assignment(
115 							Token_Receiver &	o_rReceiver,
116 							TkpContext &		i_rFollowUpContext )
117 												: 	Cx_Base(o_rReceiver, i_rFollowUpContext) {}
118 	virtual void		ReadCharChain(
119 							CharacterSource &	io_rText );
120 };
121 
122 
123 }   // namespace uidl
124 }   // namespace csi
125 
126 #endif
127 
128