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 LUIDL_CX_IDLCO_HXX
25 #define LUIDL_CX_IDLCO_HXX
26 
27 // USED SERVICES
28 	// BASE CLASSES
29 #include <tokens/tkpcont2.hxx>
30 	// COMPONENTS
31 #include <tokens/tkpstam2.hxx>
32 	// PARAMETERS
33 
34 
35 namespace csi
36 {
37 namespace uidl
38 {
39 
40 class Token_Receiver;
41 class Token;
42 
43 /**
44 */
45 class Context_UidlCode : public TkpContext,
46 						 private StateMachineContext
47 {
48   public:
49 	// 	LIFECYCLE
50 						Context_UidlCode(
51 							Token_Receiver &	o_rReceiver,
52 							DYN TkpDocuContext &
53 												let_drContext_Docu	);
54 						~Context_UidlCode();
55 	//	OPERATORS
56 
57 	//	OPERATIONS
58 	virtual void		ReadCharChain(
59 							CharacterSource &	io_rText );
60 	virtual bool		PassNewToken();
61 
62 	//	INQUIRY
63 	virtual TkpContext &
64 						FollowUpContext();
65   private:
66 	//	SERVICE FUNCTIONS
67 	void				PerformStatusFunction(
68 							uintt				i_nStatusSignal,
69 							UINT16 	      	    i_nTokenId,
70 							CharacterSource &	io_rText );
71 	void				SetupStateMachine();
72 
73 	//	DATA
74 	StateMachin2		aStateMachine;
75 	Token_Receiver *	pReceiver;
76 
77 		// Contexts
78 	Dyn<TkpDocuContext>	pDocuContext;
79 
80 	Dyn<TkpContext>    dpContext_MLComment;
81 	Dyn<TkpContext>    dpContext_SLComment;
82 	Dyn<TkpContext>    dpContext_Preprocessor;
83 	Dyn<TkpContext>    dpContext_Assignment;
84 
85 		// Temporary data, used during ReadCharChain()
86 	Dyn<Token>			pNewToken;
87 	::TkpContext *		pFollowUpContext;
88 };
89 
90 
91 }   // namespace uidl
92 }   // namespace csi
93 
94 #endif
95