changed: gcc8 base update
[opensg.git] / Source / Base / FieldContainer / Fields / OSGHardwareContextDataFieldTraits.h
blob1014f80bc8afd5913b060b89f30e0de78ec8e40b
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2003 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 \*---------------------------------------------------------------------------*/
39 #ifndef _OSGHARDWARECONTEXTDATAFIELDTRAITS_H_
40 #define _OSGHARDWARECONTEXTDATAFIELDTRAITS_H_
41 #ifdef __sgi
42 #pragma once
43 #endif
45 #include "OSGFieldTraits.h"
46 #include "OSGHardwareContextData.h"
48 OSG_BEGIN_NAMESPACE
51 /*! \ingroup GrpBaseMemoryObjectsFieldTraits
52 \ingroup GrpLibOSGBase
55 template <>
56 struct FieldTraits<HardwareContextData *> :
57 public FieldTraitsPODTemplateBase<HardwareContextData *>
59 private:
61 static DataType _type;
63 public:
65 typedef FieldTraits<HardwareContextData *> Self;
66 typedef HardwareContextData * ArgumentType;
67 typedef HardwareContextData * FieldTypeT;
69 enum { Convertible = Self::NotConvertible };
71 static OSG_BASE_DLLMAPPING
72 DataType &getType (void);
74 template<typename RefCountPolicy> inline
75 static const Char8 *getSName (void);
77 template<typename RefCountPolicy> inline
78 static const Char8 *getMName (void);
81 static HardwareContextData *getDefault(void) { return NULL; }
83 // Binary
85 // TODO Is it correct to just ignore these for binary ??
87 static SizeT getBinSize(HardwareContextData * const &)
89 return 0;
92 static SizeT getBinSize(HardwareContextData* const*,
93 SizeT )
95 return 0;
98 static void copyToBin(BinaryDataHandler &,
99 HardwareContextData * const & )
103 static void copyToBin(BinaryDataHandler &,
104 HardwareContextData * const *,
105 SizeT )
109 static void copyFromBin(BinaryDataHandler &,
110 HardwareContextData * const &)
114 static void copyFromBin(BinaryDataHandler &,
115 HardwareContextData * const *,
116 SizeT )
123 template<> inline
124 const Char8 *FieldTraits<HardwareContextData *,
125 0 >::getMName<MemObjRefCountPolicy>(
126 void)
128 return "MFHardwareContextDataPtr";
131 template<> inline
132 const Char8 *FieldTraits<HardwareContextData *,
133 0 >::getSName<MemObjRefCountPolicy>(
134 void)
136 return "SFHardwareContextDataPtr";
139 OSG_END_NAMESPACE
141 #endif /* _OSGHARDWARECONTEXTDATAFIELDTRAITS_H_ */