1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: fevnthdl.hxx,v $
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
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
65 virtual ~FileScope_EventHandler() {}
69 ary::loc::File
& io_rCurFile
);
70 void Event_IncrLineCount();
71 void Event_SwBracketOpen();
72 void Event_SwBracketClose();
73 void Event_Semicolon();
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;
88 FileScope_EventHandler::SetCurFile( ary::loc::File
& io_rCurFile
)
89 { do_SetCurFile(io_rCurFile
); }
91 FileScope_EventHandler::Event_IncrLineCount()
92 { do_Event_IncrLineCount(); }
94 FileScope_EventHandler::Event_SwBracketOpen()
95 { do_Event_SwBracketOpen(); }
97 FileScope_EventHandler::Event_SwBracketClose()
98 { do_Event_SwBracketClose(); }
100 FileScope_EventHandler::Event_Semicolon()
101 { do_Event_Semicolon(); }