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