#include <OSGBaseTypeTraits.h>
Inheritance diagram for OSG::TypeTraits< UInt8 >:

Public Types | |
| typedef Real32 | RealReturnType |
Static Public Member Functions | |
| static UInt8 | getZeroElement (void) |
| static UInt8 | getOneElement (void) |
| static UInt8 | getMax (void) |
| static UInt8 | getMin (void) |
| static Real32 | getFraction (UInt8 val) |
| static UInt8 | getPortion (Real32 val) |
| static UInt8 | getFromCString (const Char8 *pData, Char8 *&pDataEnd) |
| static UInt8 | getFromCString (const Char8 *pData) |
| static void | putToString (const UInt8 val, std::string &out) |
| static void | putToStream (const UInt8 &val, OutStream &str) |
Static Public Attributes | |
| static const bool | IsPOD = true |
| static const MathTypeProperties | MathProp = IntValue |
| static const UInt8 | BitsSet = 0xFF |
| static const UInt8 | BitsClear = 0x00 |
Definition at line 227 of file OSGBaseTypeTraits.h.
| typedef Real32 OSG::TypeTraits< UInt8 >::RealReturnType |
Definition at line 229 of file OSGBaseTypeTraits.h.
| static UInt8 OSG::TypeTraits< UInt8 >::getZeroElement | ( | void | ) | [inline, static] |
| static UInt8 OSG::TypeTraits< UInt8 >::getOneElement | ( | void | ) | [inline, static] |
| static UInt8 OSG::TypeTraits< UInt8 >::getMax | ( | void | ) | [inline, static] |
| static UInt8 OSG::TypeTraits< UInt8 >::getMin | ( | void | ) | [inline, static] |
| static Real32 OSG::TypeTraits< UInt8 >::getFraction | ( | UInt8 | val | ) | [inline, static] |
Definition at line 260 of file OSGBaseTypeTraits.h.
00261 { 00262 return (Real32(val) / Real32(getMax())); 00263 };
| static UInt8 OSG::TypeTraits< UInt8 >::getPortion | ( | Real32 | val | ) | [inline, static] |
Definition at line 265 of file OSGBaseTypeTraits.h.
00266 { 00267 #ifdef OSG_WIN32_ICL 00268 #pragma warning (disable : 810) 00269 #endif 00270 return UInt8((val * Real32(getMax()))); 00271 #ifdef OSG_WIN32_ICL 00272 #pragma warning (default : 810) 00273 #endif 00274 };
| static UInt8 OSG::TypeTraits< UInt8 >::getFromCString | ( | const Char8 * | pData, | |
| Char8 *& | pDataEnd | |||
| ) | [inline, static] |
Definition at line 277 of file OSGBaseTypeTraits.h.
00279 { 00280 if(pData != NULL) 00281 { 00282 return UInt8(strtoul(pData, &pDataEnd, 0)); 00283 } 00284 else 00285 { 00286 return getZeroElement(); 00287 } 00288 }
| static UInt8 OSG::TypeTraits< UInt8 >::getFromCString | ( | const Char8 * | pData | ) | [inline, static] |
Definition at line 290 of file OSGBaseTypeTraits.h.
00291 { 00292 Char8 *pDataEnd; 00293 00294 return getFromCString(pData, pDataEnd); 00295 }
| static void OSG::TypeTraits< UInt8 >::putToString | ( | const UInt8 | val, | |
| std::string & | out | |||
| ) | [inline, static] |
Definition at line 297 of file OSGBaseTypeTraits.h.
00299 { 00300 Char8 buffer[10]; 00301 00302 sprintf(buffer, "%u", val); 00303 00304 out.append(buffer); 00305 }
| static void OSG::TypeTraits< UInt8 >::putToStream | ( | const UInt8 & | val, | |
| OutStream & | str | |||
| ) | [inline, static] |
Reimplemented from OSG::TypeTraitsTemplateBase< UInt8 >.
Definition at line 307 of file OSGBaseTypeTraits.h.
const bool OSG::TypeTraits< UInt8 >::IsPOD = true [static] |
Definition at line 232 of file OSGBaseTypeTraits.h.
const MathTypeProperties OSG::TypeTraits< UInt8 >::MathProp = IntValue [static] |
Definition at line 233 of file OSGBaseTypeTraits.h.
const UInt8 OSG::TypeTraits< UInt8 >::BitsSet = 0xFF [static] |
Definition at line 235 of file OSGBaseTypeTraits.h.
const UInt8 OSG::TypeTraits< UInt8 >::BitsClear = 0x00 [static] |
Definition at line 236 of file OSGBaseTypeTraits.h.