Link with C++ linker
[oweals/cde.git] / cde / programs / nsgmls / EventsWanted.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
6  * These libraries and programs are free software; you can
7  * redistribute them and/or modify them under the terms of the GNU
8  * Lesser General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * These libraries and programs are distributed in the hope that
13  * they will be useful, but WITHOUT ANY WARRANTY; without even the
14  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  * PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these librararies and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 /* $XConsortium: EventsWanted.h /main/1 1996/07/29 16:51:38 cde-hp $ */
24 // Copyright (c) 1994 James Clark
25 // See the file COPYING for copying permission.
26
27 #ifndef EventsWanted_INCLUDED
28 #define EventsWanted_INCLUDED 1
29
30 #include "Boolean.h"
31
32 #ifdef SP_NAMESPACE
33 namespace SP_NAMESPACE {
34 #endif
35
36 class SP_API EventsWanted {
37 public:
38   EventsWanted();
39   Boolean wantInstanceMarkup() const;
40   Boolean wantCommentDecls() const; // in instance
41   Boolean wantMarkedSections() const; // in instance
42   Boolean wantPrologMarkup() const;
43   void addInstanceMarkup();
44   void addCommentDecls();
45   void addMarkedSections();
46   void addPrologMarkup();
47 private:
48   PackedBoolean instanceMarkup_;
49   PackedBoolean commentDecls_;
50   PackedBoolean markedSections_;
51   PackedBoolean prologMarkup_;
52 };
53
54 inline
55 EventsWanted::EventsWanted()
56 : instanceMarkup_(0), commentDecls_(0), markedSections_(0), prologMarkup_(0)
57 {
58 }
59
60 inline
61 Boolean EventsWanted::wantInstanceMarkup() const
62 {
63   return instanceMarkup_;
64 }
65
66 inline
67 void EventsWanted::addInstanceMarkup()
68 {
69   instanceMarkup_ = 1;
70   commentDecls_ = 1;
71   markedSections_ = 1;
72 }
73
74 inline
75 Boolean EventsWanted::wantCommentDecls() const
76 {
77   return commentDecls_;
78 }
79
80 inline
81 void EventsWanted::addCommentDecls()
82 {
83   commentDecls_ = 1;
84 }
85
86 inline
87 Boolean EventsWanted::wantMarkedSections() const
88 {
89   return markedSections_;
90 }
91
92 inline
93 void EventsWanted::addMarkedSections()
94 {
95   markedSections_ = 1;
96 }
97
98 inline
99 Boolean EventsWanted::wantPrologMarkup() const
100 {
101   return prologMarkup_;
102 }
103
104 inline
105 void EventsWanted::addPrologMarkup()
106 {
107   prologMarkup_ = 1;
108 }
109
110 #ifdef SP_NAMESPACE
111 }
112 #endif
113
114 #endif /* not EventsWanted_INCLUDED */