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

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

#include <OSGBaseTypeTraits.h>

Inheritance diagram for osg::TypeTraits< Int8 >:

osg::TypeTraitsBase List of all members.

Public Types

typedef Real32 RealReturnType

Static Public Member Functions

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

Static Public Attributes

static const bool IsPOD = true
static const MathTypeProperties MathProp = IntValue
static const Int8 BitsSet = -1
static const Int8 BitsClear = 0x00

Detailed Description

template<>
struct osg::TypeTraits< Int8 >

Definition at line 233 of file OSGBaseTypeTraits.h.


Member Typedef Documentation

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

Definition at line 235 of file OSGBaseTypeTraits.h.


Member Function Documentation

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

Definition at line 245 of file OSGBaseTypeTraits.h.

00246     {
00247         return 0;
00248     }

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

Definition at line 250 of file OSGBaseTypeTraits.h.

00251     {
00252         return 1;
00253     }

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

Definition at line 255 of file OSGBaseTypeTraits.h.

00256     {
00257         return std::numeric_limits<Int8>::min();
00258     }

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

Definition at line 260 of file OSGBaseTypeTraits.h.

00261     {
00262         return std::numeric_limits<Int8>::max();
00263     }

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

Definition at line 266 of file OSGBaseTypeTraits.h.

00267     {
00268         return (Real32(val) / Real32(getMax()));
00269     };

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

Definition at line 271 of file OSGBaseTypeTraits.h.

00272     {
00273         return (Int8) (val * Real32(getMax()));
00274     };

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

Definition at line 277 of file OSGBaseTypeTraits.h.

00278     {
00279         if(szString != NULL)
00280         {
00281             return Int8(strtol(szString, NULL, 0));
00282         }
00283         else
00284         {
00285             return getZeroElement();
00286         }
00287     }

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

Definition at line 289 of file OSGBaseTypeTraits.h.

00290     {
00291         Char8 buffer[10];
00292 
00293         sprintf(buffer, "%i", val);
00294 
00295         return std::string(buffer);
00296     }


Member Data Documentation

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

Definition at line 238 of file OSGBaseTypeTraits.h.

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

Definition at line 239 of file OSGBaseTypeTraits.h.

const Int8 osg::TypeTraits< Int8 >::BitsSet = -1 [static]
 

Definition at line 241 of file OSGBaseTypeTraits.h.

const Int8 osg::TypeTraits< Int8 >::BitsClear = 0x00 [static]
 

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