Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

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

#include <OSGBaseTypeTraits.h>

Inheritance diagram for osg::TypeTraits< Int32 >:

osg::TypeTraitsBase List of all members.

Public Types

typedef Real32 RealReturnType

Static Public Member Functions

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

Static Public Attributes

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

Detailed Description

template<>
struct osg::TypeTraits< Int32 >

Definition at line 522 of file OSGBaseTypeTraits.h.


Member Typedef Documentation

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

Definition at line 524 of file OSGBaseTypeTraits.h.


Member Function Documentation

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

Definition at line 534 of file OSGBaseTypeTraits.h.

00535     {
00536         return 0;
00537     }

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

Definition at line 539 of file OSGBaseTypeTraits.h.

00540     {
00541         return 1;
00542     }

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

Definition at line 544 of file OSGBaseTypeTraits.h.

00545     {
00546         return std::numeric_limits<Int32>::max(); 
00547     }

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

Definition at line 549 of file OSGBaseTypeTraits.h.

00550     {
00551         return std::numeric_limits<Int32>::min();
00552     }

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

Definition at line 555 of file OSGBaseTypeTraits.h.

00556     {
00557         return (Real32(val) / Real32(getMax()));
00558     };

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

Definition at line 560 of file OSGBaseTypeTraits.h.

00561     {
00562         return (Int32) (val * Real32(getMax()));
00563     };

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

Definition at line 566 of file OSGBaseTypeTraits.h.

00567     {
00568         if(szString != NULL)
00569         {
00570             return Int32(strtol(szString, NULL, 0));
00571         }
00572         else
00573         {
00574             return getZeroElement();
00575         }
00576     }

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

Definition at line 578 of file OSGBaseTypeTraits.h.

00579     {
00580         Char8 buffer[15];
00581 
00582         sprintf(buffer, "%i", val);
00583 
00584         return std::string(buffer);
00585     }


Member Data Documentation

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

Definition at line 527 of file OSGBaseTypeTraits.h.

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

Definition at line 528 of file OSGBaseTypeTraits.h.

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

Definition at line 530 of file OSGBaseTypeTraits.h.

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

Definition at line 531 of file OSGBaseTypeTraits.h.


The documentation for this struct was generated from the following file:
Generated on Thu Aug 25 04:12:32 2005 for OpenSG by  doxygen 1.4.3