1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2002,2002 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 _OSGBASETYPETRAITS_H_
40 #define _OSGBASETYPETRAITS_H_
45 #ifndef _OSGBASETYPES_H_
46 #error not for direct use, please include OSGBaseTypes.h instead
51 #include "OSGIOStream.h"
54 #include <boost/lexical_cast.hpp>
56 // The undef's are needed otherwise the numeric_limits won't work (GV)
68 template <class LookupTypeT
>
71 /*! \ingroup GrpBaseBaseBaseTypeTraits
72 \ingroup GrpLibOSGBase
78 static const bool IsPOD
= true;
79 static const MathTypeProperties MathProp
= BoolValue
;
81 static const bool BitsSet
= true ;
82 static const bool BitsClear
= false;
84 static bool getZeroElement(void)
89 static bool getOneElement (void)
94 static bool getMax (void)
99 static bool getMin (void)
106 /*! \ingroup GrpBaseBaseBaseTypeTraits
107 \ingroup GrpLibOSGBase
110 template <class LookupTypeT
>
111 struct TypeTraitsTemplateBase
: public TypeTraitsBase
113 static void putToStream(const LookupTypeT
&val
,
116 str
<< boost::lexical_cast
<std::string
>(val
);
120 static LookupTypeT
getFromString(const Char8
*szString
)
122 typedef TypeTraits
<LookupTypeT
> SelfTraits
;
124 return SelfTraits::getFromCString(szString
);
130 /*! \ingroup GrpBaseBaseBaseTypeTraits
131 \ingroup GrpLibOSGBase
134 template <class LookupTypeT
>
135 struct TypeTraits
: public TypeTraitsTemplateBase
<LookupTypeT
>
137 static const bool IsPOD
= true;
139 #ifdef OSG_MICROSOFT_DOTNET_COMPILER_HACKS
140 typedef LookupTypeT RealReturnType
;
145 template <class LookupTypeT
>
146 const bool TypeTraits
<LookupTypeT
>::IsPOD
;
150 /*! \ingroup GrpBaseBaseBaseTypeTraits
151 \ingroup GrpLibOSGBase
155 struct TypeTraits
<bool> : public TypeTraitsTemplateBase
<bool>
157 static const bool IsPOD
= true;
158 static const MathTypeProperties MathProp
= BoolValue
;
160 static const bool BitsSet
= true ;
161 static const bool BitsClear
= false;
164 static bool getZeroElement(void)
169 static bool getOneElement (void)
174 static bool getMax (void)
179 static bool getMin (void)
184 static bool getFromCString(const Char8
* pData
,
190 if(pData
[0] == 'T' || pData
[0] == 't')
194 if(pData
[1] != 'R' && pData
[1] != 'r')
201 if(pData
[2] != 'U' && pData
[2] != 'u')
208 if(pData
[3] != 'E' && pData
[3] != 'e')
221 static bool getFromCString(const Char8
*pData
)
225 return getFromCString(pData
, pDataEnd
);
228 static void putToString (const bool &val
,
241 static void putToStream(const bool &val
,
257 /*! \ingroup GrpBaseBaseBaseTypeTraits
258 \ingroup GrpLibOSGBase
262 struct TypeTraits
<UInt8
> : public TypeTraitsTemplateBase
<UInt8
>
264 typedef Real32 RealReturnType
;
267 static const bool IsPOD
= true;
268 static const MathTypeProperties MathProp
= IntValue
;
270 static const UInt8 BitsSet
= 0xFF;
271 static const UInt8 BitsClear
= 0x00;
274 static UInt8
getDefaultEps(void)
279 static UInt8
getZeroElement(void)
284 static UInt8
getOneElement (void)
289 static UInt8
getMax (void)
291 return std::numeric_limits
<UInt8
>::max();
294 static UInt8
getMin (void)
296 return std::numeric_limits
<UInt8
>::min();
300 static Real32
getFraction (UInt8 val
)
302 return (Real32(val
) / Real32(getMax()));
305 static UInt8
getPortion (Real32 val
)
308 #pragma warning (disable : 810)
310 return UInt8((val
* Real32(getMax())));
312 #pragma warning (default : 810)
317 static UInt8
getFromCString(const Char8
* pData
,
322 return UInt8(strtoul(pData
, &pDataEnd
, 0));
326 return getZeroElement();
330 static UInt8
getFromCString(const Char8
*pData
)
334 return getFromCString(pData
, pDataEnd
);
337 static void putToString (const UInt8 val
,
342 sprintf(buffer
, "%u", val
);
347 static void putToStream(const UInt8
&val
,
355 /*! \ingroup GrpBaseBaseBaseTypeTraits
356 \ingroup GrpLibOSGBase
360 struct TypeTraits
<Int8
> : public TypeTraitsTemplateBase
<Int8
>
362 typedef Real32 RealReturnType
;
365 static const bool IsPOD
= true;
366 static const MathTypeProperties MathProp
= IntValue
;
368 static const Int8 BitsSet
= -1; //0xFF;
369 static const Int8 BitsClear
= 0x00;
372 static Int8
getDefaultEps(void)
377 static Int8
getZeroElement(void)
382 static Int8
getOneElement (void)
387 static Int8
getMin (void)
389 return std::numeric_limits
<Int8
>::min();
392 static Int8
getMax (void)
394 return std::numeric_limits
<Int8
>::max();
398 static Real32
getFraction (Int8 val
)
400 return (Real32(val
) / Real32(getMax()));
403 static Int8
getPortion (Real32 val
)
405 return Int8(val
* Real32(getMax()));
409 static Int8
getFromCString(const Char8
* pData
,
414 return Int8(strtol(pData
, &pDataEnd
, 0));
418 return getZeroElement();
422 static Int8
getFromCString(const Char8
*pData
)
426 return getFromCString(pData
, pDataEnd
);
429 static void putToString (const Int8 val
,
434 sprintf(buffer
, "%i", val
);
439 static void putToStream(const Int8
&val
,
447 /*! \ingroup GrpBaseBaseBaseTypeTraits
448 \ingroup GrpLibOSGBase
452 struct TypeTraits
<UInt16
> : public TypeTraitsTemplateBase
<UInt16
>
454 typedef Real32 RealReturnType
;
457 static const bool IsPOD
= true;
458 static const MathTypeProperties MathProp
= IntValue
;
460 static const UInt16 BitsSet
= 0xFFFF;
461 static const UInt16 BitsClear
= 0x0000;
464 static UInt16
getDefaultEps(void)
469 static UInt16
getZeroElement(void)
474 static UInt16
getOneElement (void)
479 static UInt16
getMax (void)
481 return std::numeric_limits
<UInt16
>::max();
484 static UInt16
getMin (void)
486 return std::numeric_limits
<UInt16
>::min();
490 static Real32
getFraction (UInt16 val
)
492 return (Real32(val
) / Real32(getMax()));
495 static UInt16
getPortion (Real32 val
)
497 return UInt16(val
* Real32(getMax()));
501 static UInt16
getFromCString(const Char8
* pData
,
506 return UInt16(strtoul(pData
, &pDataEnd
, 0));
510 return getZeroElement();
514 static UInt16
getFromCString(const Char8
*pData
)
518 return getFromCString(pData
, pDataEnd
);
521 static void putToString (const UInt16 val
,
526 // Check WIN32 Version
528 sprintf(buffer
, "%u", UInt32(val
));
530 sprintf(buffer
, "%u", val
);
538 /*! \ingroup GrpBaseBaseBaseTypeTraits
539 \ingroup GrpLibOSGBase
543 struct TypeTraits
<Int16
> : public TypeTraitsTemplateBase
<Int16
>
545 typedef Real32 RealReturnType
;
548 static const bool IsPOD
= true;
549 static const MathTypeProperties MathProp
= IntValue
;
551 static const Int16 BitsSet
= -1; //0xFFFF;
552 static const Int16 BitsClear
= 0x0000;
555 static Int16
getDefaultEps(void)
560 static Int16
getZeroElement(void)
565 static Int16
getOneElement (void)
570 static Int16
getMax (void)
572 return std::numeric_limits
<Int16
>::max();
575 static Int16
getMin (void)
577 return std::numeric_limits
<Int16
>::min();
581 static Real32
getFraction (Int16 val
)
583 return (Real32(val
) / Real32(getMax()));
586 static Int16
getPortion (Real32 val
)
588 return Int16(val
* Real32(getMax()));
592 static Int16
getFromCString(const Char8
* pData
,
597 return Int16(strtol(pData
, &pDataEnd
, 0));
601 return getZeroElement();
605 static Int16
getFromCString(const Char8
*pData
)
609 return getFromCString(pData
, pDataEnd
);
612 static void putToString (const Int16 val
,
617 sprintf(buffer
, "%i", val
);
624 /*! \ingroup GrpBaseBaseBaseTypeTraits
625 \ingroup GrpLibOSGBase
629 struct TypeTraits
<UInt32
> : public TypeTraitsTemplateBase
<UInt32
>
631 typedef Real32 RealReturnType
;
634 static const bool IsPOD
= true;
635 static const MathTypeProperties MathProp
= IntValue
;
637 static const UInt32 BitsSet
= 0xFFFFFFFF;
638 static const UInt32 BitsClear
= 0x00000000;
641 static UInt32
getDefaultEps(void)
646 static UInt32
getZeroElement(void)
651 static UInt32
getOneElement (void)
656 static UInt32
getMax (void)
658 return std::numeric_limits
<UInt32
>::max();
661 static UInt32
getMin (void)
663 return std::numeric_limits
<UInt32
>::min();
667 static Real32
getFraction (UInt32 val
)
669 return (Real32(val
) / Real32(getMax()));
672 static UInt32
getPortion (Real32 val
)
674 return UInt32(val
* Real32(getMax()));
678 static UInt32
getFromCString(const Char8
* pData
,
683 return UInt32(strtoul(pData
, &pDataEnd
, 0));
687 return getZeroElement();
692 static UInt32
getFromCString(const Char8
*pData
)
696 return getFromCString(pData
, pDataEnd
);
700 static void putToString (const UInt32 val
,
705 sprintf(buffer
, "%u", val
);
712 /*! \ingroup GrpBaseBaseBaseTypeTraits
713 \ingroup GrpLibOSGBase
717 struct TypeTraits
<Int32
> : public TypeTraitsTemplateBase
<Int32
>
719 typedef Real32 RealReturnType
;
722 static const bool IsPOD
= true;
723 static const MathTypeProperties MathProp
= IntValue
;
725 static const Int32 BitsSet
= 0xFFFFFFFF;
726 static const Int32 BitsClear
= 0x00000000;
728 static Int32
getDefaultEps(void)
733 static Int32
getZeroElement(void)
738 static Int32
getOneElement (void)
743 static Int32
getMax (void)
745 return std::numeric_limits
<Int32
>::max();
748 static Int32
getMin (void)
750 return std::numeric_limits
<Int32
>::min();
754 static Real32
getFraction (Int32 val
)
756 return (Real32(val
) / Real32(getMax()));
759 static Int32
getPortion (Real32 val
)
761 return Int32(val
* Real32(getMax()));
765 static Int32
getFromCString(const Char8
* pData
,
770 return Int32(strtol(pData
, &pDataEnd
, 0));
774 return getZeroElement();
778 static Int32
getFromCString(const Char8
*pData
)
782 return getFromCString(pData
, pDataEnd
);
785 static void putToString (const Int32 val
,
790 sprintf(buffer
, "%i", val
);
797 /*! \ingroup GrpBaseBaseBaseTypeTraits
798 \ingroup GrpLibOSGBase
802 struct TypeTraits
<UInt64
> : public TypeTraitsTemplateBase
<UInt64
>
804 typedef Real32 RealReturnType
;
807 static const bool IsPOD
= true;
808 static const MathTypeProperties MathProp
= IntValue
;
810 static const UInt64 BitsSet
= OSGLL(0xFFFFFFFFFFFFFFFF);
811 static const UInt64 BitsClear
= OSGLL(0x0000000000000000);
813 static const UInt64 Zero
= OSGLL(0x0000000000000000);
814 static const UInt64 One
= OSGLL(0x0000000000000001);
817 static UInt64
getDefaultEps(void)
822 static UInt64
getZeroElement(void)
827 static UInt64
getOneElement (void)
833 static UInt64
getMax (void)
835 return std::numeric_limits
<UInt64
>::max();
838 static UInt64
getMin (void)
840 return std::numeric_limits
<UInt64
>::min();
844 static Real32
getFraction (UInt64 val
)
846 return (Real32(val
) / Real32(getMax()));
849 static UInt64
getPortion (Real32 val
)
851 return UInt64(val
* Real32(getMax()));
855 static UInt64
getFromCString(const Char8
* pData
,
861 return UInt64(strtoull(pData
, &pDataEnd
, 0));
864 return _atoi64(pData
);
869 return getZeroElement();
873 static UInt64
getFromCString(const Char8
*pData
)
877 return getFromCString(pData
, pDataEnd
);
880 static void putToString (const UInt64 val
,
884 #if defined(__x86_64__) && ! defined(__APPLE__)
885 sprintf(buffer
, "%lu", val
);
887 sprintf(buffer
, "%llu", val
);
894 /*! \ingroup GrpBaseBaseBaseTypeTraits
895 \ingroup GrpLibOSGBase
899 struct TypeTraits
<Int64
> : public TypeTraitsTemplateBase
<Int64
>
901 typedef Real32 RealReturnType
;
904 static const bool IsPOD
= true;
905 static const MathTypeProperties MathProp
= IntValue
;
907 static const Int64 BitsSet
= OSGLL(0xFFFFFFFFFFFFFFFF);
908 static const Int64 BitsClear
= OSGLL(0x0000000000000000);
911 static Int64
getDefaultEps(void)
916 static Int64
getZeroElement(void)
921 static Int64
getOneElement (void)
926 static Int64
getMax (void)
928 return std::numeric_limits
<Int64
>::max();
931 static Int64
getMin (void)
933 return std::numeric_limits
<Int64
>::min();
937 static Real32
getFraction (Int64 val
)
939 return (Real32(val
) / Real32(getMax()));
942 static Int64
getPortion (Real32 val
)
944 return Int64(val
* Real32(getMax()));
948 static Int64
getFromCString(const Char8
* pData
,
954 return Int64(strtoll(pData
, &pDataEnd
, 0));
957 return _atoi64(pData
);
962 return getZeroElement();
966 static Int64
getFromCString(const Char8
*pData
)
970 return getFromCString(pData
, pDataEnd
);
973 static void putToString (const Int64 val
,
978 #if defined(__x86_64__) && ! defined(__APPLE__)
979 sprintf(buffer
, "%li", val
);
981 sprintf(buffer
, "%lli", val
);
988 /*! \ingroup GrpBaseBaseBaseTypeTraits
989 \ingroup GrpLibOSGBase
993 struct TypeTraits
<Real16
> : public TypeTraitsTemplateBase
<Real16
>
995 typedef Real16 RealReturnType
;
998 static const bool IsPOD
= true;
999 static const MathTypeProperties MathProp
= RealValue
;
1001 static Real16
getDefaultEps(void)
1003 return Real16(1E-06f
);
1006 static Real16
getZeroElement(void)
1011 static Real16
getOneElement (void)
1016 static Real16
getMax (void)
1021 static Real16
getMin (void)
1027 static Real16
getFraction (Real16 rVal
) { return rVal
; };
1028 static Real16
getPortion (Real16 rVal
) { return rVal
; };
1031 static Real16
getFromCString (const Char8
*szString
,
1034 if(szString
!= NULL
)
1036 #if defined(__sgi) || defined(WIN32) || defined(__sun)
1037 return Real16(Real32(atof (szString
)));
1039 return Real16(Real32(strtof(szString
, &pDataEnd
)));
1044 return getZeroElement();
1048 static Real16
getFromCString (const Char8
*pData
)
1052 return getFromCString(pData
, pDataEnd
);
1055 static void putToString(const Real16 val
,
1060 sprintf(buffer
, "%e", Real32(val
));
1067 /*! \ingroup GrpBaseBaseBaseTypeTraits
1068 \ingroup GrpLibOSGBase
1072 struct TypeTraits
<Real32
> : public TypeTraitsTemplateBase
<Real32
>
1074 typedef Real32 RealReturnType
;
1077 static const bool IsPOD
= true;
1078 static const MathTypeProperties MathProp
= RealValue
;
1080 static Real32
ZeroEps(void)
1085 static Real32
getDefaultEps(void)
1090 static Real32
getZeroElement(void)
1095 static Real32
getOneElement (void)
1100 static Real32
getMax (void)
1102 return std::numeric_limits
<float>::max();
1105 static Real32
getMin (void)
1107 return -std::numeric_limits
<float>::max();
1111 static Real32
getFraction (Real32 rVal
) { return rVal
; };
1112 static Real32
getPortion (Real32 rVal
) { return rVal
; };
1115 static Real32
getFromCString (const Char8
* pData
,
1120 #if defined(__sgi) || defined(WIN32) || defined(__sun)
1122 return Real32(atof (pData
));
1124 return Real32(strtof(pData
, &pDataEnd
));
1129 return getZeroElement();
1133 static Real32
getFromCString (const Char8
*pData
)
1137 return getFromCString(pData
, pDataEnd
);
1140 static void putToString(const Real32 val
,
1143 out
.append(boost::lexical_cast
<std::string
>(val
));
1148 /*! \ingroup GrpBaseBaseBaseTypeTraits
1149 \ingroup GrpLibOSGBase
1153 struct TypeTraits
<Fixed32
> : public TypeTraitsTemplateBase
<Fixed32
>
1155 typedef Fixed32 RealReturnType
;
1158 static const bool IsPOD
= true;
1159 static const MathTypeProperties MathProp
= RealValue
;
1162 static Fixed32
ZeroEps(void)
1164 return Fixed32(0.00009f
);
1167 static Fixed32
getDefaultEps (void)
1169 return Fixed32(1E-06f
);
1172 static Fixed32
getZeroElement(void)
1174 return Fixed32(0.f
);
1177 static Fixed32
getOneElement (void)
1179 return Fixed32(1.f
);
1182 static Fixed32
getMax (void)
1184 return Fixed32(REAL16_MAX
);
1187 static Fixed32
getMin (void)
1189 return Fixed32(-REAL16_MAX
);
1192 static Fixed32
getFromCString (const Char8
* pData
,
1193 Char8
*&OSG_CHECK_ARG(pDataEnd
))
1195 // XXX TODO: implement
1199 return getZeroElement();
1203 return getZeroElement();
1207 static Fixed32
getFromCString (const Char8
*pData
)
1209 // XXX TODO: implement
1213 return getFromCString(pData
, pDataEnd
);
1216 static void putToString(const Fixed32
OSG_CHECK_ARG(val
),
1217 std::string
& OSG_CHECK_ARG(out
))
1219 // XXX TODO: implement
1224 /*! \ingroup GrpBaseBaseBaseTypeTraits
1225 \ingroup GrpLibOSGBase
1229 struct TypeTraits
<Real64
> : public TypeTraitsTemplateBase
<Real64
>
1231 typedef Real64 RealReturnType
;
1234 static const bool IsPOD
= true;
1235 static const MathTypeProperties MathProp
= RealValue
;
1237 static Real64
ZeroEps(void)
1242 static Real64
getDefaultEps (void)
1247 static Real64
getZeroElement(void)
1252 static Real64
getOneElement (void)
1257 static Real64
getMax (void)
1259 return std::numeric_limits
<double>::max();
1262 static Real64
getMin (void)
1264 return -std::numeric_limits
<double>::max();
1268 static Real64
getFraction (Real64 rVal
) { return rVal
; };
1269 static Real64
getPortion (Real64 rVal
) { return rVal
; };
1272 static Real64
getFromCString (const Char8
* pData
,
1277 return Real64(strtod(pData
, &pDataEnd
));
1281 return getZeroElement();
1285 static Real64
getFromCString (const Char8
*pData
)
1289 return getFromCString(pData
, pDataEnd
);
1292 static void putToString(const Real64 val
,
1295 out
.append(boost::lexical_cast
<std::string
>(val
));
1300 /*! \ingroup GrpBaseBaseBaseTypeTraits
1301 \ingroup GrpLibOSGBase
1305 struct TypeTraits
<Real128
> : public TypeTraitsTemplateBase
<Real128
>
1307 typedef Real128 RealReturnType
;
1310 static const bool IsPOD
= true;
1311 static const MathTypeProperties MathProp
= RealValue
;
1313 static Real64
getDefaultEps (void)
1318 static Real128
getZeroElement(void)
1323 static Real128
getOneElement (void)
1328 static Real128
getMax (void)
1330 return std::numeric_limits
<long double>::max();
1333 static Real128
getMin (void)
1335 return -std::numeric_limits
<long double>::max();
1339 static Real128
getFraction (Real128 rVal
) { return rVal
; };
1340 static Real128
getPortion (Real128 rVal
) { return rVal
; };
1343 static Real128
getFromCString (const Char8
* pData
,
1348 #if defined(WIN32) || defined(__sun)
1349 return Real128(strtod (pData
, &pDataEnd
));
1351 return Real128(strtold(pData
, &pDataEnd
));
1356 return getZeroElement();
1360 static Real128
getFromCString (const Char8
*pData
)
1364 return getFromCString(pData
, pDataEnd
);
1367 static void putToString(const Real128 val
,
1370 out
.append(boost::lexical_cast
<std::string
>(val
));
1375 #ifdef SIZE_T_NEQ_UINT32
1377 /*! \ingroup GrpBaseBaseBaseTypeTraits
1378 \ingroup GrpLibOSGBase
1383 struct TypeTraits
<size_t> : public TypeTraits
<UInt64
> {};
1386 struct TypeTraits
<size_t> : public TypeTraits
<UInt32
> {};
1391 struct TypeTraits
<size_t> : public TypeTraitsTemplateBase
<size_t>
1393 typedef Real32 RealReturnType
;
1396 static const bool IsPOD
= true;
1397 static const MathTypeProperties MathProp
= IntValue
;
1399 static const UInt32 BitsSet
= 0xFFFFFFFF;
1400 static const UInt32 BitsClear
= 0x00000000;
1403 static size_t getZeroElement(void)
1408 static size_t getOneElement (void)
1413 static size_t getMax (void)
1415 return std::numeric_limits
<size_t>::max();
1418 static size_t getMin (void)
1420 return std::numeric_limits
<size_t>::min();
1424 static size_t getFromCString(const Char8
* pData
,
1429 return size_t(strtoul(pData
, &pDataEnd
, 0));
1433 return getZeroElement();
1438 static size_t getFromCString(const Char8
*pData
)
1442 return getFromCString(pData
, pDataEnd
);
1446 static void putToString (const size_t val
,
1451 sprintf(buffer
, "%u", val
);
1461 #ifdef OSG_GLENUM_NEQ_UINT32
1463 /*! \ingroup GrpBaseBaseBaseTypeTraits
1464 \ingroup GrpLibOSGBase
1468 struct TypeTraits
<GLenum
> : public TypeTraitsTemplateBase
<GLenum
>
1470 typedef Real32 RealReturnType
;
1473 static const bool IsPOD
= true;
1474 static const MathTypeProperties MathProp
= IntValue
;
1476 static const UInt32 BitsSet
= 0xFFFFFFFF;
1477 static const UInt32 BitsClear
= 0x00000000;
1480 static GLenum
getZeroElement(void)
1485 static GLenum
getOneElement (void)
1490 static GLenum
getMax (void)
1495 static GLenum
getMin (void)
1501 static GLenum
getFromCString(const Char8
* pData
,
1506 return GLenum(strtoul(pData
, reinterpret_cast<char**>(pDataEnd
), 0));
1510 return getZeroElement();
1514 static GLenum
getFromCString(const Char8
*pData
)
1518 return getFromCString(pData
, pDataEnd
);
1521 static void putToString (const GLenum val
,
1526 sprintf(buffer
, "%lu", static_cast<unsigned long>(val
));
1536 #ifndef OSG_DISABLE_DEPRECATED
1537 #define TypeConstants TypeTraits
1538 #define getAllSet() BitsSet
1541 #endif /* _OSGBASETYPETRAITS_H_ */