fixed: gcc8 compile issues
[opensg.git] / Tools / fcd2code / TemplateFieldContainerFields_h.txt
blob7cee6d777a9980656e2af71d5ce50f4739852bfc
1 /*---------------------------------------------------------------------------*\
2  *                                OpenSG                                     *
3  *                                                                           *
4  *                                                                           *
5  *               Copyright (C) 2000-2013 by the OpenSG Forum                 *
6  *                                                                           *
7  *                            www.opensg.org                                 *
8  *                                                                           *
9 @@if hasAuthors
10 @!AuthorsCommentText!@
11 @@else // hasAuthors
12  * contact: dirk@opensg.org, gerrit.voss@vossg.org, carsten_neumann@gmx.net  *
13 @@endif // hasAuthors
14  *                                                                           *
15 \*---------------------------------------------------------------------------*/
16 /*---------------------------------------------------------------------------*\
17  *                                License                                    *
18  *                                                                           *
19  * This library is free software; you can redistribute it and/or modify it   *
20  * under the terms of the GNU Library General Public License as published    *
21  * by the Free Software Foundation, version 2.                               *
22  *                                                                           *
23  * This library is distributed in the hope that it will be useful, but       *
24  * WITHOUT ANY WARRANTY; without even the implied warranty of                *
25  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
26  * Library General Public License for more details.                          *
27  *                                                                           *
28  * You should have received a copy of the GNU Library General Public         *
29  * License along with this library; if not, write to the Free Software       *
30  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 *
31  *                                                                           *
32 \*---------------------------------------------------------------------------*/
33 /*---------------------------------------------------------------------------*\
34  *                                Changes                                    *
35  *                                                                           *
36  *                                                                           *
37  *                                                                           *
38  *                                                                           *
39  *                                                                           *
40  *                                                                           *
41 \*---------------------------------------------------------------------------*/
43 /*****************************************************************************\
44  *****************************************************************************
45  **                                                                         **
46  **                  This file is automatically generated.                  **
47  **                                                                         **
48  **          Any changes made to this file WILL be lost when it is          **
49  **           regenerated, which can become necessary at any time.          **
50  **                                                                         **
51  *****************************************************************************
52 \*****************************************************************************/
55 #ifndef _OSG@!CLASSNAME!@FIELDS_H_
56 #define _OSG@!CLASSNAME!@FIELDS_H_
57 #ifdef __sgi
58 #pragma once
59 #endif
61 #include "@!HeaderPrefix!@@!Package!@Config.h"
62 @@if isInLibrary
63 #include "OSG@!Libname!@Def.h"
64 @@endif
66 #include "@!HeaderPrefix!@OSGFieldContainerFields.h"
67 #include "@!HeaderPrefix!@OSGPointerSField.h"
68 #include "@!HeaderPrefix!@OSGPointerMField.h"
71 @!LIBNAMESPACE!@_BEGIN_NAMESPACE
73 @!IMPORTNAMESPACE!@
74 class @!Classname!@;
76 OSG_GEN_CONTAINERPTR(@!Classname!@);
77 @@if inExternalNamespace
79 @!LIBNAMESPACE!@_END_NAMESPACE
81 OSG_BEGIN_NAMESPACE
83 @!LIBNAMESPACE!@_IMPORT_NAMESPACE;
84 @@endif
85 @@if isInLibrary
86 /*! \ingroup @!DocGroupBase!@FieldTraits
87     \ingroup GrpLibOSG@!Libname!@
88  */
89 @@endif
90 template <>
91 struct FieldTraits<@!Classname!@ *, @!nsConst!@> :
92     public FieldTraitsFCPtrBase<@!Classname!@ *, @!nsConst!@>
94   private:
96     static PointerType             _type;
98   public:
100     typedef FieldTraits<@!Classname!@ *, @!nsConst!@>  Self;
102     enum                        { Convertible = NotConvertible };
104     @@if isInLibrary
105     static OSG_@!LIBNAME!@_DLLMAPPING DataType &getType(void);
106     @@else // isInLibrary
107     static DataType &getType(void);
108     @@endif // isInLibrary
110 @@if SFPointerField
111     template<typename RefCountPolicy> inline
112     static const Char8    *getSName     (void);
114 @@endif // SFPointerField
115 @@if MFPointerField
116     template<typename RefCountPolicy> inline
117     static const Char8    *getMName     (void);
119 @@endif // MFPointerField
122 @@if SFPointerField
123 template<> inline
124 const Char8 *FieldTraits<@!Classname!@ *, @!nsConst!@>::getSName<RecordedRefCountPolicy>(void)
126     return "SFRec@!Classname!@Ptr"; 
129 template<> inline
130 const Char8 *FieldTraits<@!Classname!@ *, @!nsConst!@>::getSName<UnrecordedRefCountPolicy>(void)
132     return "SFUnrec@!Classname!@Ptr"; 
135 template<> inline
136 const Char8 *FieldTraits<@!Classname!@ *, @!nsConst!@>::getSName<WeakRefCountPolicy>(void)
138     return "SFWeak@!Classname!@Ptr"; 
141 template<> inline
142 const Char8 *FieldTraits<@!Classname!@ *, @!nsConst!@>::getSName<NoRefCountPolicy>(void)
144     return "SFUnrefd@!Classname!@Ptr"; 
146 @@endif
148 @@if MFPointerField
149 template<> inline
150 const Char8 *FieldTraits<@!Classname!@ *, @!nsConst!@>::getMName<RecordedRefCountPolicy>(void)
152     return "MFRec@!Classname!@Ptr"; 
155 template<> inline
156 const Char8 *FieldTraits<@!Classname!@ *, @!nsConst!@>::getMName<UnrecordedRefCountPolicy>(void)
158     return "MFUnrec@!Classname!@Ptr"; 
161 template<> inline
162 const Char8 *FieldTraits<@!Classname!@ *, @!nsConst!@>::getMName<WeakRefCountPolicy>(void)
164     return "MFWeak@!Classname!@Ptr"; 
167 template<> inline
168 const Char8 *FieldTraits<@!Classname!@ *, @!nsConst!@>::getMName<NoRefCountPolicy>(void)
170     return "MFUnrefd@!Classname!@Ptr"; 
172 @@endif
174 @@if ChildField
176 @@if isInLibrary
177 /*! \ingroup @!DocGroupBase!@FieldTraits
178  */
179 @@endif
180 template <>
181 struct FieldTraits<@!Classname!@ *, @!nsConst!@ + @!ChildNS!@> :
182     public FieldTraitsFCPtrBase<@!Classname!@ *, @!nsConst!@ + @!ChildNS!@>
184   private:
186   public:
187     typedef FieldTraits<@!Classname!@ *, @!nsConst!@ + @!ChildNS!@>  Self;
189     enum                        { Convertible = NotConvertible };
190 @@if PointerField
192     @@if isInLibrary
193     static OSG_@!LIBNAME!@_DLLMAPPING DataType &getType(void);
194     @@else // isInLibrary
195     static DataType &getType(void);
196     @@endif // isInLibrary
197 @@endif // PointerField
198 @@if SFPointerField
200     template<typename RefCountPolicy> inline
201     static const Char8    *getSName     (void);
202 @@endif // SFPointerField
203 @@if MFPointerField
205     template<typename RefCountPolicy> inline
206     static const Char8    *getMName     (void);
207 @@endif // MFPointerField
210 @@if SFPointerField
211 template<> inline
212 const Char8 *FieldTraits<@!Classname!@ *, @!nsConst!@ + @!ChildNS!@>::getSName<RecordedRefCountPolicy>(void)
214     return "SFRecChild@!Classname!@Ptr"; 
217 template<> inline
218 const Char8 *FieldTraits<@!Classname!@ *, @!nsConst!@ + @!ChildNS!@>::getSName<UnrecordedRefCountPolicy>(void)
220     return "SFUnrecChild@!Classname!@Ptr"; 
223 template<> inline
224 const Char8 *FieldTraits<@!Classname!@ *, @!nsConst!@ + @!ChildNS!@>::getSName<WeakRefCountPolicy>(void)
226     return "SFWeakChild@!Classname!@Ptr"; 
229 template<> inline
230 const Char8 *FieldTraits<@!Classname!@ *, @!nsConst!@ + @!ChildNS!@>::getSName<NoRefCountPolicy>(void)
232     return "SFUnrefdChild@!Classname!@Ptr"; 
234 @@endif
236 @@if MFPointerField
237 template<> inline
238 const Char8 *FieldTraits<@!Classname!@ *, @!nsConst!@ + @!ChildNS!@>::getMName<RecordedRefCountPolicy>(void)
240     return "MFRecChild@!Classname!@Ptr"; 
243 template<> inline
244 const Char8 *FieldTraits<@!Classname!@ *, @!nsConst!@ + @!ChildNS!@>::getMName<UnrecordedRefCountPolicy>(void)
246     return "MFUnrecChild@!Classname!@Ptr"; 
249 template<> inline
250 const Char8 *FieldTraits<@!Classname!@ *, @!nsConst!@ + @!ChildNS!@>::getMName<WeakRefCountPolicy>(void)
252     return "MFWeakChild@!Classname!@Ptr"; 
255 template<> inline
256 const Char8 *FieldTraits<@!Classname!@ *, @!nsConst!@ + @!ChildNS!@>::getMName<NoRefCountPolicy>(void)
258     return "MFUnrefdChild@!Classname!@Ptr"; 
260 @@endif
262 @@endif
263 @@if ParentField
265 @@if isInLibrary
266 /*! \ingroup @!DocGroupBase!@FieldTraits
267  */
268 @@endif
269 template <>
270 struct FieldTraits<@!Classname!@ *, @!nsConst!@ + @!ParentNS!@> : 
271     public FieldTraitsFCPtrBase<@!Classname!@ *, @!nsConst!@ + @!ParentNS!@>
273   private:
275     static  DataType                                _type;
277   public:
279     static const bool bIsPointerField = true;
281     typedef FieldTraits<@!Classname!@ *, @!nsConst!@ + @!ParentNS!@> Self;
284     enum             { Convertible = Self::NotConvertible };
285     
286     static OSG_@!LIBNAME!@_DLLMAPPING
287                  DataType &getType (void);
289     static const Char8    *getSName(void) 
290     {
291         return "SFParent@!Classname!@Ptr"; 
292     }
294     static const Char8    *getMName(void) 
295     { 
296         return "MFParent@!Classname!@Ptr"; 
297     }
299 @@endif
301 @@if inExternalNamespace
302 OSG_END_NAMESPACE
304 @!LIBNAMESPACE!@_BEGIN_NAMESPACE
306 OSG_IMPORT_NAMESPACE;
308 @@endif
309 #ifndef DOXYGEN_SHOULD_SKIP_THIS
310 @@if SFPointerField
311     @@if isInLibrary
312 /*! \ingroup @!DocGroupBase!@FieldSFields */
313     @@endif // isInLibrary
314 typedef PointerSField<@!Classname!@ *,
315                       RecordedRefCountPolicy, @!nsConst!@  > SFRec@!Classname!@Ptr;
316     @@if isInLibrary
317 /*! \ingroup @!DocGroupBase!@FieldSFields */
318     @@endif // isInLibrary
319 typedef PointerSField<@!Classname!@ *,
320                       UnrecordedRefCountPolicy, @!nsConst!@> SFUnrec@!Classname!@Ptr;
321     @@if isInLibrary
322 /*! \ingroup @!DocGroupBase!@FieldSFields */
323     @@endif // isInLibrary
324 typedef PointerSField<@!Classname!@ *,
325                       WeakRefCountPolicy, @!nsConst!@      > SFWeak@!Classname!@Ptr;
326     @@if isInLibrary
327 /*! \ingroup @!DocGroupBase!@FieldSFields */
328     @@endif // isInLibrary
329 typedef PointerSField<@!Classname!@ *,
330                       NoRefCountPolicy, @!nsConst!@        > SFUncounted@!Classname!@Ptr;
332 @@endif
334 @@if MFPointerField
335     @@if isInLibrary
336 /*! \ingroup @!DocGroupBase!@FieldMFields */
337     @@endif // isInLibrary
338 typedef PointerMField<@!Classname!@ *,
339                       RecordedRefCountPolicy, @!nsConst!@  > MFRec@!Classname!@Ptr;
340     @@if isInLibrary
341 /*! \ingroup @!DocGroupBase!@FieldMFields */
342     @@endif // isInLibrary
343 typedef PointerMField<@!Classname!@ *,
344                       UnrecordedRefCountPolicy, @!nsConst!@> MFUnrec@!Classname!@Ptr;
345     @@if isInLibrary
346 /*! \ingroup @!DocGroupBase!@FieldMFields */
347     @@endif // isInLibrary
348 typedef PointerMField<@!Classname!@ *,
349                       WeakRefCountPolicy, @!nsConst!@      > MFWeak@!Classname!@Ptr;
350     @@if isInLibrary
351 /*! \ingroup @!DocGroupBase!@FieldMFields */
352     @@endif // isInLibrary
353 typedef PointerMField<@!Classname!@ *,
354                       NoRefCountPolicy, @!nsConst!@        > MFUncounted@!Classname!@Ptr;
357 @@endif
358 @@if ChildSFields
360     @@if isInLibrary
361 /*! \ingroup @!DocGroupBase!@FieldSFields */
362     @@endif // isInLibrary
363 typedef ChildPointerSField<
364           @!Classname!@ *, 
365           UnrecordedRefCountPolicy,
366           @!nsConst!@ + @!ChildNS!@             > SFUnrecChild@!Classname!@Ptr;
368 @@endif
369 @@if ChildMFields
371     @@if isInLibrary
372 /*! \ingroup @!DocGroupBase!@FieldMFields */
373     @@endif // isInLibrary
374 typedef ChildPointerMField<
375           @!Classname!@ *, 
376           UnrecordedRefCountPolicy,
377           @!nsConst!@ + @!ChildNS!@             > MFUnrecChild@!Classname!@Ptr;
379 @@endif
380 @@if ParentSFields
382     @@if isInLibrary
383 /*! \ingroup @!DocGroupBase!@FieldSFields */
384     @@endif // isInLibrary
385 typedef ParentPointerSField<
386           @!Classname!@ *, 
387           NoRefCountPolicy,
388           @!nsConst!@ + @!ParentNS!@    > SFParent@!Classname!@Ptr;
389 @@endif
390 @@if ParentMFields
392     @@if isInLibrary
393 /*! \ingroup @!DocGroupBase!@FieldMFields */
394     @@endif // isInLibrary
395 typedef ParentPointerMField<
396           @!Classname!@ *, 
397           NoRefCountPolicy,
398           @!nsConst!@ + @!ParentNS!@    > MFParent@!Classname!@Ptr;
400 @@endif
403 #else // these are the doxygen hacks
405 @@if SFPointerField
406     @@if isInLibrary
407 /*! \ingroup @!DocGroupBase!@FieldSFields \ingroup GrpLibOSG@!Libname!@ */
408     @@endif // isInLibrary
409 struct SFRec@!Classname!@Ptr : 
410     public PointerSField<@!Classname!@ *,
411                          RecordedRefCountPolicy> {};
412     @@if isInLibrary
413 /*! \ingroup @!DocGroupBase!@FieldSFields \ingroup GrpLibOSG@!Libname!@ */
414     @@endif // isInLibrary
415 struct SFUnrec@!Classname!@Ptr : 
416     public PointerSField<@!Classname!@ *,
417                          UnrecordedRefCountPolicy> {};
418     @@if isInLibrary
419 /*! \ingroup @!DocGroupBase!@FieldSFields \ingroup GrpLibOSG@!Libname!@ */
420     @@endif // isInLibrary
421 struct SFWeak@!Classname!@Ptr :
422     public PointerSField<@!Classname!@ *,
423                          WeakRefCountPolicy> {};
424     @@if isInLibrary
425 /*! \ingroup @!DocGroupBase!@FieldSFields \ingroup GrpLibOSG@!Libname!@ */
426     @@endif // isInLibrary
427 struct SFUncounted@!Classname!@Ptr :
428     public PointerSField<@!Classname!@ *,
429                          NoRefCountPolicy> {};
431 @@endif
433 @@if MFPointerField
434     @@if isInLibrary
435 /*! \ingroup @!DocGroupBase!@FieldMFields \ingroup GrpLibOSG@!Libname!@ */
436     @@endif // isInLibrary
437 struct MFRec@!Classname!@Ptr :
438     public PointerMField<@!Classname!@ *,
439                          RecordedRefCountPolicy  > {};
440     @@if isInLibrary
441 /*! \ingroup @!DocGroupBase!@FieldMFields \ingroup GrpLibOSG@!Libname!@ */
442     @@endif // isInLibrary
443 struct MFUnrec@!Classname!@Ptr :
444     public PointerMField<@!Classname!@ *,
445                          UnrecordedRefCountPolicy> {};
446     @@if isInLibrary
447 /*! \ingroup @!DocGroupBase!@FieldMFields \ingroup GrpLibOSG@!Libname!@ */
448     @@endif // isInLibrary
449 struct MFWeak@!Classname!@Ptr :
450     public PointerMField<@!Classname!@ *,
451                          WeakRefCountPolicy      > {};
452     @@if isInLibrary
453 /*! \ingroup @!DocGroupBase!@FieldMFields \ingroup GrpLibOSG@!Libname!@ */
454     @@endif // isInLibrary
455 struct MFUncounted@!Classname!@Ptr :
456     public PointerMField<@!Classname!@ *,
457                          NoRefCountPolicy        > {};
460 @@endif
461 @@if ChildSFields
463     @@if isInLibrary
464 /*! \ingroup @!DocGroupBase!@FieldSFields \ingroup GrpLibOSG@!Libname!@ */
465     @@endif // isInLibrary
466 struct SFUnrecChild@!Classname!@Ptr :
467     public ChildPointerSField<
468         @!Classname!@ *, 
469         UnrecordedRefCountPolicy,
470         @!nsConst!@ + @!ChildNS!@             > {};
472 @@endif
473 @@if ChildMFields
475     @@if isInLibrary
476 /*! \ingroup @!DocGroupBase!@FieldMFields \ingroup GrpLibOSG@!Libname!@ */
477     @@endif // isInLibrary
478 struct MFUnrecChild@!Classname!@Ptr :
479     public ChildPointerMField<
480         @!Classname!@ *, 
481         UnrecordedRefCountPolicy,
482         @!nsConst!@ + @!ChildNS!@             > {};
484 @@endif
485 @@if ParentSFields
487     @@if isInLibrary
488 /*! \ingroup @!DocGroupBase!@FieldSFields \ingroup GrpLibOSG@!Libname!@ */
489     @@endif // isInLibrary
490 struct SFParent@!Classname!@Ptr :
491     public ParentPointerSField<
492         @!Classname!@ *, 
493         NoRefCountPolicy,
494         @!nsConst!@ + @!ParentNS!@    > {};
495 @@endif
496 @@if ParentMFields
498     @@if isInLibrary
499 /*! \ingroup @!DocGroupBase!@FieldMFields \ingroup GrpLibOSG@!Libname!@ */
500     @@endif // isInLibrary
501 struct MFParent@!Classname!@Ptr :
502     public  ParentPointerMField<
503         @!Classname!@ *, 
504         NoRefCountPolicy,
505         @!nsConst!@ + @!ParentNS!@    > {};
507 @@endif
509 #endif // these are the doxygen hacks
511 @!LIBNAMESPACE!@_END_NAMESPACE
513 #endif /* _OSG@!CLASSNAME!@FIELDS_H_ */