merge the formfield patch from ooo-build
[ooovba.git] / autodoc / source / parser / cpp / fevnthdl.hxx
blob095c30414c8c182f9864c39f96659e7e5f66dae0
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: fevnthdl.hxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef ADC_CPP_FEVNTHDL_HXX
32 #define ADC_CPP_FEVNTHDL_HXX
36 // USED SERVICES
37 // BASE CLASSES
38 // COMPONENTS
39 // PARAMETERS
42 namespace ary
44 namespace loc
46 class File;
53 namespace cpp
57 /** This is an interface, which accepts the file scope events that may
58 be important for parsing. It is implementation-dependant, where to
59 put or what to do with them.
61 class FileScope_EventHandler
63 public:
64 // LIFECYCLE
65 virtual ~FileScope_EventHandler() {}
67 // OPERATIONS
68 void SetCurFile(
69 ary::loc::File & io_rCurFile );
70 void Event_IncrLineCount();
71 void Event_SwBracketOpen();
72 void Event_SwBracketClose();
73 void Event_Semicolon();
75 private:
76 virtual void do_SetCurFile(
77 ary::loc::File & io_rCurFile ) = 0;
78 virtual void do_Event_IncrLineCount() = 0;
79 virtual void do_Event_SwBracketOpen() = 0;
80 virtual void do_Event_SwBracketClose() = 0;
81 virtual void do_Event_Semicolon() = 0;
85 // IMPLEMENTATION
87 inline void
88 FileScope_EventHandler::SetCurFile( ary::loc::File & io_rCurFile )
89 { do_SetCurFile(io_rCurFile); }
90 inline void
91 FileScope_EventHandler::Event_IncrLineCount()
92 { do_Event_IncrLineCount(); }
93 inline void
94 FileScope_EventHandler::Event_SwBracketOpen()
95 { do_Event_SwBracketOpen(); }
96 inline void
97 FileScope_EventHandler::Event_SwBracketClose()
98 { do_Event_SwBracketClose(); }
99 inline void
100 FileScope_EventHandler::Event_Semicolon()
101 { do_Event_Semicolon(); }
106 } // namespace cpp
107 #endif