xref: /AOO41X/main/autodoc/source/parser_i/inc/s2_luidl/cx_sub.hxx (revision 1ecadb572e7010ff3b3382ad9bf179dbc6efadbb)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef ADC_LUIDL_CX_SUB_HXX
29 #define ADC_LUIDL_CX_SUB_HXX
30 
31 // USED SERVICES
32 	// BASE CLASSES
33 #include <tokens/tkpcont2.hxx>
34 	// COMPONENTS
35 	// PARAMETERS
36 
37 #include "uidl_tok.hxx"
38 
39 namespace csi
40 {
41 namespace uidl
42 {
43 
44 class Token_Receiver;
45 class Token;
46 
47 
48 class Cx_Base : public ::TkpContext
49 {
50   public:
51 	virtual bool		PassNewToken();
52 	virtual TkpContext &
53 						FollowUpContext();
54   protected:
55 	// LIFECYCLE
56 						Cx_Base(
57 							Token_Receiver &	o_rReceiver,
58 							TkpContext &		i_rFollowUpContext )
59 												: 	rReceiver(o_rReceiver),
60 												    pFollowUpContext(&i_rFollowUpContext),
61 												    pNewToken()
62 													{}
63   protected:
64 	void				SetToken(
65 							DYN Token *			let_dpToken )
66 												{ pNewToken = let_dpToken; }
67     Token_Receiver &	Receiver()              { return rReceiver; }
68 
69   private:
70 	// DATA
71 	Token_Receiver &	rReceiver;
72 	TkpContext *		pFollowUpContext;
73 	Dyn<Token>			pNewToken;
74 };
75 
76 
77 
78 /**
79 @descr
80 */
81 
82 class Context_MLComment : public Cx_Base
83 {
84   public:
85 						Context_MLComment(
86 							Token_Receiver &	o_rReceiver,
87 							TkpContext &		i_rFollowUpContext )
88 												: 	Cx_Base(o_rReceiver, i_rFollowUpContext) {}
89 	virtual void		ReadCharChain(
90 							CharacterSource &	io_rText );
91 };
92 
93 class Context_SLComment : public Cx_Base
94 {
95   public:
96 						Context_SLComment(
97 							Token_Receiver &	o_rReceiver,
98 							TkpContext &		i_rFollowUpContext )
99 												: 	Cx_Base(o_rReceiver, i_rFollowUpContext) {}
100 	virtual void		ReadCharChain(
101 							CharacterSource &	io_rText );
102 };
103 
104 class Context_Praeprocessor : public Cx_Base
105 {
106   public:
107 						Context_Praeprocessor(
108 							Token_Receiver &	o_rReceiver,
109 							TkpContext &		i_rFollowUpContext )
110 												: 	Cx_Base(o_rReceiver, i_rFollowUpContext) {}
111 	virtual void		ReadCharChain(
112 							CharacterSource &	io_rText );
113 };
114 
115 class Context_Assignment : public Cx_Base
116 {
117   public:
118 						Context_Assignment(
119 							Token_Receiver &	o_rReceiver,
120 							TkpContext &		i_rFollowUpContext )
121 												: 	Cx_Base(o_rReceiver, i_rFollowUpContext) {}
122 	virtual void		ReadCharChain(
123 							CharacterSource &	io_rText );
124 };
125 
126 
127 }   // namespace uidl
128 }   // namespace csi
129 
130 #endif
131 
132