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

#include <OSGBaseTypeTraits.h>

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

osg::TypeTraitsBase

List of all members.

Public Types

typedef Real32 RealReturnType

Static Public Member Functions

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

Static Public Attributes

static const bool IsPOD = true
static const MathTypeProperties MathProp = IntValue
static const UInt32 BitsSet = 0xFFFFFFFF
static const UInt32 BitsClear = 0x00000000


Detailed Description

template<>
struct osg::osg::TypeTraits< UInt32 >

Definition at line 451 of file OSGBaseTypeTraits.h.


Member Typedef Documentation

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

Definition at line 453 of file OSGBaseTypeTraits.h.


Member Function Documentation

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

Definition at line 463 of file OSGBaseTypeTraits.h.

00464     {
00465         return 0;
00466     }

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

Definition at line 468 of file OSGBaseTypeTraits.h.

00469     {
00470         return 1;
00471     }

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

Definition at line 473 of file OSGBaseTypeTraits.h.

00474     { 
00475         return std::numeric_limits<UInt32>::max();
00476     }

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

Definition at line 478 of file OSGBaseTypeTraits.h.

00479     {
00480         return std::numeric_limits<UInt32>::min();
00481     }

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

Definition at line 484 of file OSGBaseTypeTraits.h.

00485     {
00486         return (Real32(val) / Real32(getMax()));
00487     };

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

Definition at line 489 of file OSGBaseTypeTraits.h.

00490     {
00491         return (UInt32) (val * Real32(getMax()));
00492     };

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

Definition at line 495 of file OSGBaseTypeTraits.h.

00496     {
00497         if(szString != NULL)
00498         {
00499             return UInt32(strtoul(szString, NULL, 0));
00500         }
00501         else
00502         {
00503             return getZeroElement();
00504         }
00505     }

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

Definition at line 507 of file OSGBaseTypeTraits.h.

00508     {
00509         Char8 buffer[15];
00510 
00511         sprintf(buffer, "%u", val);
00512 
00513         return std::string(buffer);
00514     }


Member Data Documentation

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

Definition at line 456 of file OSGBaseTypeTraits.h.

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

Definition at line 457 of file OSGBaseTypeTraits.h.

const UInt32 osg::osg::TypeTraits< UInt32 >::BitsSet = 0xFFFFFFFF [static]

Definition at line 459 of file OSGBaseTypeTraits.h.

const UInt32 osg::osg::TypeTraits< UInt32 >::BitsClear = 0x00000000 [static]

Definition at line 460 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