1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2003 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
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. *
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. *
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. *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
37 \*---------------------------------------------------------------------------*/
39 #ifndef _OSGHARDWARECONTEXTDATAFIELDTRAITS_H_
40 #define _OSGHARDWARECONTEXTDATAFIELDTRAITS_H_
45 #include "OSGFieldTraits.h"
46 #include "OSGHardwareContextData.h"
51 /*! \ingroup GrpBaseMemoryObjectsFieldTraits
52 \ingroup GrpLibOSGBase
56 struct FieldTraits
<HardwareContextData
*> :
57 public FieldTraitsPODTemplateBase
<HardwareContextData
*>
61 static DataType _type
;
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
; }
85 // TODO Is it correct to just ignore these for binary ??
87 static SizeT
getBinSize(HardwareContextData
* const &)
92 static SizeT
getBinSize(HardwareContextData
* const*,
98 static void copyToBin(BinaryDataHandler
&,
99 HardwareContextData
* const & )
103 static void copyToBin(BinaryDataHandler
&,
104 HardwareContextData
* const *,
109 static void copyFromBin(BinaryDataHandler
&,
110 HardwareContextData
* const &)
114 static void copyFromBin(BinaryDataHandler
&,
115 HardwareContextData
* const *,
124 const Char8
*FieldTraits
<HardwareContextData
*,
125 0 >::getMName
<MemObjRefCountPolicy
>(
128 return "MFHardwareContextDataPtr";
132 const Char8
*FieldTraits
<HardwareContextData
*,
133 0 >::getSName
<MemObjRefCountPolicy
>(
136 return "SFHardwareContextDataPtr";
141 #endif /* _OSGHARDWARECONTEXTDATAFIELDTRAITS_H_ */