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

#include <OSGBaseTypeTraits.h>

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

osg::TypeTraitsBase

List of all members.

Public Types

typedef Real32 RealReturnType

Static Public Member Functions

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

Static Public Attributes

static const bool IsPOD = true
static const MathTypeProperties MathProp = IntValue
static const Int64 BitsSet = 0xFFFFFFFFFFFFFFFFLL
static const Int64 BitsClear = 0x0000000000000000LL


Detailed Description

template<>
struct osg::osg::TypeTraits< Int64 >

Definition at line 691 of file OSGBaseTypeTraits.h.


Member Typedef Documentation

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

Definition at line 693 of file OSGBaseTypeTraits.h.


Member Function Documentation

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

Definition at line 708 of file OSGBaseTypeTraits.h.

00709     {
00710         return 0;
00711     }

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

Definition at line 713 of file OSGBaseTypeTraits.h.

00714     {
00715         return 1;
00716     }

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

Definition at line 718 of file OSGBaseTypeTraits.h.

00719     {
00720         return std::numeric_limits<Int64>::max();
00721     }

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

Definition at line 723 of file OSGBaseTypeTraits.h.

00724     {
00725         return std::numeric_limits<Int64>::min();
00726     }

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

Definition at line 729 of file OSGBaseTypeTraits.h.

00730     {
00731         return (Real32(val) / Real32(getMax()));
00732     };

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

Definition at line 734 of file OSGBaseTypeTraits.h.

00735     {
00736         return (Int64) (val * Real32(getMax()));
00737     };

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

Definition at line 740 of file OSGBaseTypeTraits.h.

00741     {
00742         if(szString != NULL)
00743         {
00744 #ifndef WIN32
00745 #ifdef __sgi
00746             // on my sgi machine strtoll is defined in the header
00747             // but not in the lib. amz
00748             Int64 r = 0;
00749             sscanf(szString, "%lld", &r);
00750             return r;
00751 #else
00752             return Int64(strtoll(szString, NULL, 0));
00753 #endif
00754 #else
00755             return _atoi64(szString);
00756 #endif
00757         }
00758         else
00759         {
00760             return getZeroElement();
00761         }
00762     }

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

Definition at line 764 of file OSGBaseTypeTraits.h.

00765     {
00766         Char8 buffer[25];
00767 
00768 #ifdef __x86_64__
00769         sprintf(buffer, "%li", val);
00770 #else
00771         sprintf(buffer, "%lli", val);
00772 #endif
00773 
00774         return std::string(buffer);
00775     }


Member Data Documentation

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

Definition at line 696 of file OSGBaseTypeTraits.h.

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

Definition at line 697 of file OSGBaseTypeTraits.h.

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

Definition at line 700 of file OSGBaseTypeTraits.h.

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

Definition at line 701 of file OSGBaseTypeTraits.h.


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

Generated on Mon Mar 17 11:10:43 2008 for OpenSG by  doxygen 1.5.5