Debian Codegraph @

lib/database/src/so/actions/SoActionInit.c++

raw
1 /*
2 *
3 * Copyright (C) 2000 Silicon Graphics, Inc. All Rights Reserved.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * Further, this software is distributed without any warranty that it is
16 * free of the rightful claim of any third person regarding infringement
17 * or the like. Any license provided herein, whether implied or
18 * otherwise, applies only to this software file. Patent licenses, if
19 * any, provided herein do not apply to combinations of this program with
20 * other software, or any other product whatsoever.
21 *
22 * You should have received a copy of the GNU Lesser General Public
23 * License along with this library; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 *
26 * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
27 * Mountain View, CA 94043, or:
28 *
29 * http://www.sgi.com
30 *
31 * For further information regarding this notice, see:
32 *
33 * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
34 *
35 */
36
37 /*
38 * Copyright (C) 1990,91,92 Silicon Graphics, Inc.
39 *
40 _______________________________________________________________________
41 ______________ S I L I C O N G R A P H I C S I N C . ____________
42 |
43 | $Revision: 1.1.1.1 $
44 |
45 | Class:
46 | call initClasses for all action classes
47 |
48 | Author(s) : Ronen Barzel
49 |
50 ______________ S I L I C O N G R A P H I C S I N C . ____________
51 _______________________________________________________________________
52 */
53
54 #include <Inventor/actions/SoActions.h>
55 #include <Inventor/elements/SoElements.h>
56 #include <Inventor/misc/SoBasic.h>
57
58 ////////////////////////////////////////////////////////////////////////
59 //
60 // Description:
61 // This initializes ALL Inventor action classes.
62 //
63 // Use: internal
64
65 void
66 SoAction::initClasses()
67 //
68 ////////////////////////////////////////////////////////////////////////
69 {
70 // base class must be initialized first
71 SoAction::initClass();
72
73 SoCallbackAction::initClass();
74 SoGLRenderAction::initClass();
75 SoGetBoundingBoxAction::initClass();
76 SoGetMatrixAction::initClass();
77 SoHandleEventAction::initClass();
78 SoPickAction::initClass();
79 SoRayPickAction::initClass();
80 SoSearchAction::initClass();
81 SoWriteAction::initClass();
82 }
83 ////////////////////////////////////////////////////////////////////////
84 //
85 // Description:
86 // Initializes the SoAction class.
87 //
88 // Use: internal
89
90 void
91 SoAction::initClass()
92 //
93 ////////////////////////////////////////////////////////////////////////
94 {
95 enabledElements = new SoEnabledElementsList(NULL);
96 methods = new SoActionMethodList(NULL);
97
98 // Allocate a new action type id. There's no real parent id, so we
99 // can't use the regular macro.
100 classTypeId = SoType::createType(SoType::badType(), "SoAction", NULL);
101
102 // Enable override element for all actions.
103 enabledElements->enable(SoOverrideElement::getClassTypeId(),
104 SoOverrideElement::getClassStackIndex());
105 }
106
107 ////////////////////////////////////////////////////////////////////////
108 //
109 // Description:
110 // Initializes the SoCallbackAction class.
111 //
112 // Use: internal
113
114 void
115 SoCallbackAction::initClass()
116 //
117 ////////////////////////////////////////////////////////////////////////
118 {
119 SO_ACTION_INIT_CLASS(SoCallbackAction, SoAction);
120 }
121
122 ////////////////////////////////////////////////////////////////////////
123 //
124 // Description:
125 // Initializes the SoGLRenderAction class.
126 //
127 // Use: internal
128
129 void
130 SoGLRenderAction::initClass()
131 //
132 ////////////////////////////////////////////////////////////////////////
133 {
134 SO_ACTION_INIT_CLASS(SoGLRenderAction, SoAction);
135
136 SO_ENABLE(SoGLRenderAction, SoGLLazyElement);
137 SO_ENABLE(SoGLRenderAction, SoGLRenderPassElement);
138 SO_ENABLE(SoGLRenderAction, SoViewportRegionElement);
139 SO_ENABLE(SoGLRenderAction, SoWindowElement);
140 }
141
142 ////////////////////////////////////////////////////////////////////////
143 //
144 // Description:
145 // Initializes the SoGetBoundingBoxAction class.
146 //
147 // Use: internal
148
149 void
150 SoGetBoundingBoxAction::initClass()
151 //
152 ////////////////////////////////////////////////////////////////////////
153 {
154 SO_ACTION_INIT_CLASS(SoGetBoundingBoxAction, SoAction);
155
156 SO_ENABLE(SoGetBoundingBoxAction, SoViewportRegionElement);
157 }
158
159 ////////////////////////////////////////////////////////////////////////
160 //
161 // Description:
162 // Initializes the SoGetMatrixAction class.
163 //
164 // Use: internal
165
166 void
167 SoGetMatrixAction::initClass()
168 //
169 ////////////////////////////////////////////////////////////////////////
170 {
171 SO_ACTION_INIT_CLASS(SoGetMatrixAction, SoAction);
172
173 SO_ENABLE(SoGetMatrixAction, SoViewportRegionElement);
174 }
175
176 ////////////////////////////////////////////////////////////////////////
177 //
178 // Description:
179 // Initializes the SoHandleEventAction class.
180 //
181 // Use: internal
182
183 void
184 SoHandleEventAction::initClass()
185 //
186 ////////////////////////////////////////////////////////////////////////
187 {
188 SO_ACTION_INIT_CLASS(SoHandleEventAction, SoAction);
189
190 SO_ENABLE(SoHandleEventAction, SoViewportRegionElement);
191 SO_ENABLE(SoHandleEventAction, SoWindowElement);
192 }
193
194 ////////////////////////////////////////////////////////////////////////
195 //
196 // Description:
197 // Initializes the SoPickAction class.
198 //
199 // Use: internal
200
201 void
202 SoPickAction::initClass()
203 //
204 ////////////////////////////////////////////////////////////////////////
205 {
206 SO_ACTION_INIT_CLASS(SoPickAction, SoAction);
207
208 SO_ENABLE(SoPickAction, SoViewportRegionElement);
209 }
210
211 ////////////////////////////////////////////////////////////////////////
212 //
213 // Description:
214 // Initializes the SoRayPickAction class.
215 //
216 // Use: internal
217
218 void
219 SoRayPickAction::initClass()
220 //
221 ////////////////////////////////////////////////////////////////////////
222 {
223 SO_ACTION_INIT_CLASS(SoRayPickAction, SoPickAction);
224
225 SO_ENABLE(SoRayPickAction, SoPickRayElement);
226 }
227
228 ////////////////////////////////////////////////////////////////////////
229 //
230 // Description:
231 // Initializes the SoSearchAction class.
232 //
233 // Use: internal
234
235 void
236 SoSearchAction::initClass()
237 //
238 ////////////////////////////////////////////////////////////////////////
239 {
240 SO_ACTION_INIT_CLASS(SoSearchAction, SoAction);
241 }
242
243 ////////////////////////////////////////////////////////////////////////
244 //
245 // Description:
246 // Initializes the SoWriteAction class.
247 //
248 // Use: internal
249
250 void
251 SoWriteAction::initClass()
252 //
253 ////////////////////////////////////////////////////////////////////////
254 {
255 SO_ACTION_INIT_CLASS(SoWriteAction, SoAction);
256 }
257