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_CPP_FEVNTHDL_HXX
29 #define ADC_CPP_FEVNTHDL_HXX
30 
31 
32 
33 // USED SERVICES
34 	// BASE CLASSES
35 	// COMPONENTS
36 	// PARAMETERS
37 
38 
39 namespace ary
40 {
41 namespace loc
42 {
43     class File;
44 }
45 }
46 
47 
48 
49 
50 namespace cpp
51 {
52 
53 
54 /**	This is an interface, which accepts the file scope events that may
55     be important for parsing. It is implementation-dependant, where to
56 	put or what to do with them.
57 */
58 class FileScope_EventHandler
59 {
60   public:
61 	// LIFECYCLE
62 	virtual             ~FileScope_EventHandler() {}
63 
64 	// OPERATIONS
65 	void                SetCurFile(
66 							ary::loc::File &	io_rCurFile );
67 	void                Event_IncrLineCount();
68 	void                Event_SwBracketOpen();
69 	void                Event_SwBracketClose();
70 	void                Event_Semicolon();
71 
72   private:
73 	virtual void        do_SetCurFile(
74 							ary::loc::File &	io_rCurFile ) = 0;
75 	virtual void        do_Event_IncrLineCount() = 0;
76 	virtual void        do_Event_SwBracketOpen() = 0;
77 	virtual void        do_Event_SwBracketClose() = 0;
78 	virtual void        do_Event_Semicolon() = 0;
79 };
80 
81 
82 // IMPLEMENTATION
83 
84 inline void
85 FileScope_EventHandler::SetCurFile( ary::loc::File & io_rCurFile )
86 	{ do_SetCurFile(io_rCurFile); }
87 inline void
88 FileScope_EventHandler::Event_IncrLineCount()
89 	{ do_Event_IncrLineCount(); }
90 inline void
91 FileScope_EventHandler::Event_SwBracketOpen()
92 	{ do_Event_SwBracketOpen(); }
93 inline void
94 FileScope_EventHandler::Event_SwBracketClose()
95 	{ do_Event_SwBracketClose(); }
96 inline void
97 FileScope_EventHandler::Event_Semicolon()
98 	{ do_Event_Semicolon(); }
99 
100 
101 
102 
103 }   // namespace cpp
104 #endif
105 
106