changed: gcc8 base update
[opensg.git] / Source / System / Image / OSGImageGenericAtt.h
blob93b96650792e97595f884b082a25873dfd1e149f
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2000-2002 by the OpenSG Forum *
6 * *
7 * www.opensg.org *
8 * *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
10 * *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
13 * License *
14 * *
15 * This library is free software; you can redistribute it and/or modify it *
16 * under the terms of the GNU Library General Public License as published *
17 * by the Free Software Foundation, version 2. *
18 * *
19 * This library is distributed in the hope that it will be useful, but *
20 * WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
22 * Library General Public License for more details. *
23 * *
24 * You should have received a copy of the GNU Library General Public *
25 * License along with this library; if not, write to the Free Software *
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
27 * *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
30 * Changes *
31 * *
32 * *
33 * *
34 * *
35 * *
36 * *
37 \*---------------------------------------------------------------------------*/
40 #ifndef _OSGIMAGEGENERICATT_H_
41 #define _OSGIMAGEGENERICATT_H_
42 #ifdef __sgi
43 #pragma once
44 #endif
46 #include "OSGSystemDef.h"
47 #include "OSGBaseTypes.h"
48 #include "OSGBaseFunctions.h"
50 #include <vector>
51 #include <string>
53 #include "OSGFieldContainer.h"
54 #include "OSGAttachment.h"
55 #include "OSGDynamicAttachmentMixin.h"
56 #include "OSGFieldContainerFieldTraits.h"
58 #include "OSGPointerSField.h"
59 #include "OSGPointerMField.h"
61 OSG_BEGIN_NAMESPACE
63 class FieldDescriptionBase;
65 /*! \ingroup GrpSystemImageHelper
66 \nohierarchy
69 struct ImageGenericAttDesc
71 typedef Attachment Parent;
72 typedef Attachment *ParentPtr;
74 static const Char8 *getTypeName (void) { return "ImageGenericAtt"; }
75 static const Char8 *getParentTypeName(void)
77 return "Attachment";
79 static const Char8 *getGroupName (void) { return "ImageGenAtt"; }
81 static InitContainerF getInitMethod(void) { return NULL; }
83 static FieldDescriptionBase **getDesc (void) { return NULL; }
86 #ifndef DOXYGEN_SHOULD_SKIP_THIS
87 /*! \ingroup GrpSystemImageHelper
89 typedef DynFieldAttachment<ImageGenericAttDesc> ImageGenericAtt;
90 #else
91 /*! \ingroup GrpSystemImageHelper
93 class ImageGenericAtt : public DynFieldAttachment<ImageGenericAttDesc> {};
94 #endif
96 /*! \ingroup GrpSystemImageHelper
99 typedef RefCountPtr<ImageGenericAtt,
100 UnrecordedRefCountPolicy> ImageGenericAttUnrecPtr;
102 #ifndef DOXYGEN_SHOULD_SKIP_THIS
104 #ifndef OSG_IMAGEGENERICATT
105 #if defined(OSG_WIN32_CL) && _MSC_VER > 1300
106 OSG_ABSTR_FC_DLLEXPORT_DECL(DynFieldAttachment,
107 ImageGenericAttDesc,
109 #else
110 OSG_ABSTR_FC_DLLEXPORT_DECL(DynFieldAttachment,
111 ImageGenericAttDesc,
112 OSG_SYSTEMLIB_DLLTMPLMAPPING)
113 #endif
114 #endif
116 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
120 /*! \ingroup GrpSystemImageFieldTraits
121 \ingroup GrpLibOSGSystem
124 template <>
125 struct FieldTraits<ImageGenericAtt *, 0> :
126 public FieldTraitsFCPtrBase<ImageGenericAtt *>
128 static DataType _type;
129 typedef FieldTraits<ImageGenericAtt *> Self;
131 enum { Convertible = Self::NotConvertible };
133 static DataType &getType (void) { return _type; }
135 template<typename RefCountPolicy> inline
136 static const Char8 *getSName(void);
138 template<typename RefCountPolicy> inline
139 static const Char8 *getMName(void);
142 template<> inline
143 const Char8 *FieldTraits<
144 ImageGenericAtt *, 0>::getSName<RecordedRefCountPolicy>(void)
146 return "SFRecImageGenericAttPtr";
149 template<> inline
150 const Char8 *FieldTraits<
151 ImageGenericAtt *, 0>::getSName<UnrecordedRefCountPolicy>(void)
153 return "SFUnrecImageGenericAttPtr";
156 template<> inline
157 const Char8 *FieldTraits<
158 ImageGenericAtt *, 0>::getSName<WeakRefCountPolicy>(void)
160 return "SFWeakImageGenericAttPtr";
163 template<> inline
164 const Char8 *FieldTraits<
165 ImageGenericAtt *, 0>::getSName<NoRefCountPolicy>(void)
167 return "SFUnrefdImageGenericAttPtr";
172 template<> inline
173 const Char8 *FieldTraits<
174 ImageGenericAtt *, 0>::getMName<RecordedRefCountPolicy>(void)
176 return "MFRecImageGenericAttPtr";
179 template<> inline
180 const Char8 *FieldTraits<
181 ImageGenericAtt *, 0>::getMName<UnrecordedRefCountPolicy>(void)
183 return "MFUnrecImageGenericAttPtr";
186 template<> inline
187 const Char8 *FieldTraits<
188 ImageGenericAtt *, 0>::getMName<WeakRefCountPolicy>(void)
190 return "MFWeakImageGenericAttPtr";
193 template<> inline
194 const Char8 *FieldTraits<
195 ImageGenericAtt *, 0>::getMName<NoRefCountPolicy>(void)
197 return "MFUnrefdImageGenericAttPtr";
202 #ifndef DOXYGEN_SHOULD_SKIP_THIS
203 /*! \ingroup GrpSystemImageFieldSFields */
204 typedef PointerSField<ImageGenericAtt *,
205 RecordedRefCountPolicy > SFRecImageGenericAtPtr;
206 /*! \ingroup GrpSystemImageFieldSFields */
207 typedef PointerSField<ImageGenericAtt *,
208 UnrecordedRefCountPolicy> SFUnrecImageGenericAtPtr;
209 /*! \ingroup GrpSystemImageFieldSFields */
210 typedef PointerSField<ImageGenericAtt *,
211 WeakRefCountPolicy > SFWeakImageGenericAtPtr;
212 /*! \ingroup GrpSystemImageFieldSFields */
213 typedef PointerSField<ImageGenericAtt *,
214 NoRefCountPolicy > SFUncountedImageGenericAtPtr;
218 /*! \ingroup GrpSystemImageFieldMFields */
219 typedef PointerMField<ImageGenericAtt *,
220 RecordedRefCountPolicy > MFRecImageGenericAttPtr;
221 /*! \ingroup GrpSystemImageFieldMFields */
222 typedef PointerMField<ImageGenericAtt *,
223 UnrecordedRefCountPolicy> MFUnrecImageGenericAttPtr;
224 /*! \ingroup GrpSystemImageFieldMFields */
225 typedef PointerMField<ImageGenericAtt *,
226 WeakRefCountPolicy > MFWeakImageGenericAttPtr;
227 /*! \ingroup GrpSystemImageFieldMFields */
228 typedef PointerMField<ImageGenericAtt *,
229 NoRefCountPolicy > MFUncountedImageGenericAttPtr;
230 #else
231 /*! \ingroup GrpSystemImageFieldSFields \ingroup GrpLibOSGSystem */
232 struct SFRecImageGenericAtPtr :
233 public PointerSField<ImageGenericAtt *,
234 RecordedRefCountPolicy > {};
235 /*! \ingroup GrpSystemImageFieldSFields \ingroup GrpLibOSGSystem */
236 struct SFUnrecImageGenericAtPtr :
237 public PointerSField<ImageGenericAtt *,
238 UnrecordedRefCountPolicy> {};
239 /*! \ingroup GrpSystemImageFieldSFields \ingroup GrpLibOSGSystem */
240 struct SFWeakImageGenericAtPtr :
241 public PointerSField<ImageGenericAtt *,
242 WeakRefCountPolicy > {};
243 /*! \ingroup GrpSystemImageFieldSFields \ingroup GrpLibOSGSystem */
244 struct SFUncountedImageGenericAtPtr :
245 public PointerSField<ImageGenericAtt *,
246 NoRefCountPolicy > {};
250 /*! \ingroup GrpSystemImageFieldMFields \ingroup GrpLibOSGSystem */
251 struct MFRecImageGenericAttPtr :
252 public PointerMField<ImageGenericAtt *,
253 RecordedRefCountPolicy > {};
254 /*! \ingroup GrpSystemImageFieldMFields \ingroup GrpLibOSGSystem */
255 struct MFUnrecImageGenericAttPtr :
256 public PointerMField<ImageGenericAtt *,
257 UnrecordedRefCountPolicy> {};
258 /*! \ingroup GrpSystemImageFieldMFields \ingroup GrpLibOSGSystem */
259 struct MFWeakImageGenericAttPtr :
260 public PointerMField<ImageGenericAtt *,
261 WeakRefCountPolicy > {};
262 /*! \ingroup GrpSystemImageFieldMFields \ingroup GrpLibOSGSystem */
263 struct MFUncountedImageGenericAttPtr :
264 public PointerMField<ImageGenericAtt *,
265 NoRefCountPolicy > {};
266 #endif
269 OSG_END_NAMESPACE
271 #endif /* _OSGIMAGEGENERICATT_H_ */