osg::osg::TypeTraits< UInt64 > Struct Template Reference
[BaseTypesTraits]

#include <OSGBaseTypeTraits.h>

Inheritance diagram for osg::osg::TypeTraits< UInt64 >:

osg::TypeTraitsBase

List of all members.

Public Types

typedef Real32 RealReturnType

Static Public Member Functions

static UInt64 getZeroElement (void)
static UInt64 getOneElement (void)
static UInt64 getMax (void)
static UInt64 getMin (void)
static Real32 getFraction (UInt64 val)
static UInt64 getPortion (Real32 val)
static UInt64 getFromString (const Char8 *szString)
static std::string putToString (const UInt64 val)

Static Public Attributes

static const bool IsPOD = true
static const MathTypeProperties MathProp = IntValue
static const UInt64 BitsSet = 0xFFFFFFFFFFFFFFFFLL
static const UInt64 BitsClear = 0x0000000000000000LL
static const UInt64 Zero = 0x0000000000000000LL
static const UInt64 One = 0x0000000000000001LL


Detailed Description

template<>
struct osg::osg::TypeTraits< UInt64 >

Definition at line 593 of file OSGBaseTypeTraits.h.


Member Typedef Documentation

typedef Real32 osg::osg::TypeTraits< UInt64 >::RealReturnType

Definition at line 595 of file OSGBaseTypeTraits.h.


Member Function Documentation

static UInt64 osg::osg::TypeTraits< UInt64 >::getZeroElement ( void   )  [inline, static]

Definition at line 617 of file OSGBaseTypeTraits.h.

00618     {
00619         return 0;
00620     }

static UInt64 osg::osg::TypeTraits< UInt64 >::getOneElement ( void   )  [inline, static]

Definition at line 622 of file OSGBaseTypeTraits.h.

00623     {
00624         return 1;
00625     }

static UInt64 osg::osg::TypeTraits< UInt64 >::getMax ( void   )  [inline, static]

Definition at line 628 of file OSGBaseTypeTraits.h.

00629     {
00630         return std::numeric_limits<UInt64>::max();
00631     }

static UInt64 osg::osg::TypeTraits< UInt64 >::getMin ( void   )  [inline, static]

Definition at line 633 of file OSGBaseTypeTraits.h.

00634     {
00635         return std::numeric_limits<UInt64>::min();
00636     }

static Real32 osg::osg::TypeTraits< UInt64 >::getFraction ( UInt64  val  )  [inline, static]

Definition at line 639 of file OSGBaseTypeTraits.h.

00640     {
00641         return (Real32(val) / Real32(getMax()));
00642     };

static UInt64 osg::osg::TypeTraits< UInt64 >::getPortion ( Real32  val  )  [inline, static]

Definition at line 644 of file OSGBaseTypeTraits.h.

00645     {
00646         return (UInt64) (val * Real32(getMax()));
00647     };

static UInt64 osg::osg::TypeTraits< UInt64 >::getFromString ( const Char8 szString  )  [inline, static]

Definition at line 650 of file OSGBaseTypeTraits.h.

00651     {
00652         if(szString != NULL)
00653         {
00654 #ifndef WIN32
00655 #ifdef __sgi
00656             // on my sgi machine strtoull is defined in the header
00657             // but not in the lib. amz
00658             UInt64 r = 0;
00659             sscanf(szString, "%llu", &r);
00660             return r;
00661 #else
00662             return UInt64(strtoull(szString, NULL, 0));
00663 #endif
00664 #else
00665             return _atoi64(szString);
00666 #endif
00667         }
00668         else
00669         {
00670             return getZeroElement();
00671         }
00672     }

static std::string osg::osg::TypeTraits< UInt64 >::putToString ( const UInt64  val  )  [inline, static]

Definition at line 674 of file OSGBaseTypeTraits.h.

00675     {
00676         Char8 buffer[25];
00677 #ifdef __x86_64__
00678         sprintf(buffer, "%lu", val);
00679 #else
00680         sprintf(buffer, "%llu", val);
00681 #endif
00682         return std::string(buffer);
00683     }


Member Data Documentation

const bool osg::osg::TypeTraits< UInt64 >::IsPOD = true [static]

Definition at line 598 of file OSGBaseTypeTraits.h.

const MathTypeProperties osg::osg::TypeTraits< UInt64 >::MathProp = IntValue [static]

Definition at line 599 of file OSGBaseTypeTraits.h.

const UInt64 osg::osg::TypeTraits< UInt64 >::BitsSet = 0xFFFFFFFFFFFFFFFFLL [static]

Definition at line 602 of file OSGBaseTypeTraits.h.

const UInt64 osg::osg::TypeTraits< UInt64 >::BitsClear = 0x0000000000000000LL [static]

Definition at line 603 of file OSGBaseTypeTraits.h.

const UInt64 osg::osg::TypeTraits< UInt64 >::Zero = 0x0000000000000000LL [static]

Definition at line 605 of file OSGBaseTypeTraits.h.

const UInt64 osg::osg::TypeTraits< UInt64 >::One = 0x0000000000000001LL [static]

Definition at line 606 of file OSGBaseTypeTraits.h.


The documentation for this struct was generated from the following file:

Generated on Mon Mar 17 12:03:11 2008 for OpenSG by  doxygen 1.5.5