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

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

#include <OSGBaseTypeTraits.h>

Inheritance diagram for osg::TypeTraits< Int16 >:

osg::TypeTraitsBase List of all members.

Public Types

typedef Real32 RealReturnType

Static Public Member Functions

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

Static Public Attributes

static const bool IsPOD = true
static const MathTypeProperties MathProp = IntValue
static const Int16 BitsSet = -1
static const Int16 BitsClear = 0x0000

Detailed Description

template<>
struct osg::TypeTraits< Int16 >

Definition at line 380 of file OSGBaseTypeTraits.h.


Member Typedef Documentation

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

Definition at line 382 of file OSGBaseTypeTraits.h.


Member Function Documentation

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

Definition at line 392 of file OSGBaseTypeTraits.h.

00393     {
00394         return 0;
00395     }

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

Definition at line 397 of file OSGBaseTypeTraits.h.

00398     {
00399         return 1;
00400     }

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

Definition at line 402 of file OSGBaseTypeTraits.h.

00403     {
00404         return std::numeric_limits<Int16>::max();
00405     }

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

Definition at line 407 of file OSGBaseTypeTraits.h.

00408     {
00409         return std::numeric_limits<Int16>::min();
00410     }

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

Definition at line 413 of file OSGBaseTypeTraits.h.

00414     {
00415         return (Real32(val) / Real32(getMax()));
00416     };

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

Definition at line 418 of file OSGBaseTypeTraits.h.

00419     {
00420         return (Int16) (val * Real32(getMax()));
00421     };

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

Definition at line 424 of file OSGBaseTypeTraits.h.

00425     {
00426         if(szString != NULL)
00427         {
00428             return Int16(strtol(szString, NULL, 0));
00429         }
00430         else
00431         {
00432             return getZeroElement();
00433         }
00434     }

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

Definition at line 436 of file OSGBaseTypeTraits.h.

00437     {
00438         Char8 buffer[10];
00439 
00440         sprintf(buffer, "%i", val);
00441 
00442         return std::string(buffer);
00443     }


Member Data Documentation

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

Definition at line 385 of file OSGBaseTypeTraits.h.

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

Definition at line 386 of file OSGBaseTypeTraits.h.

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

Definition at line 388 of file OSGBaseTypeTraits.h.

const Int16 osg::TypeTraits< Int16 >::BitsClear = 0x0000 [static]
 

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