osg::FieldDataTraits< Color4ub > Struct Template Reference
[Field Data Traits]

#include <OSGBaseFieldDataType.h>

Inheritance diagram for osg::FieldDataTraits< Color4ub >:
osg::FieldTraitsRecurseBase< Color4ub > osg::FieldTraits

List of all members.

Public Types

enum  { StringConvertable }
enum  
typedef osgIF< uiTest==1,
const Color4ub, const Color4ub & >
::_IRet 
ArgumentType
enum  { ToStringConvertable = 0x01, FromStringConvertable = 0x02 }

Static Public Member Functions

static DataTypegetType (void)
static const Char8getSName (void)
static const Char8getMName (void)
static Color4ub getDefault (void)
static bool getFromString (Color4ub &outVal, const Char8 *&inVal)
static void putToString (const Color4ub &inVal, std::string &outStr)
static UInt32 getBinSize (const Color4ub &)
static UInt32 getBinSize (const Color4ub *, UInt32 uiNumObjects)
static void copyToBin (BinaryDataHandler &pMem, const Color4ub &oObject)
static void copyFromBin (BinaryDataHandler &pMem, Color4ub &oObject)
static void copyToBin (BinaryDataHandler &pMem, const Color4ub *pObjectStore, UInt32 uiNumObjects)
static void copyFromBin (BinaryDataHandler &pMem, Color4ub *pObjectStore, UInt32 uiNumObjects)
static bool getFromString (Color4ub &outVal, const Char8 *inVal)
static const Char8getPName (void)

Static Public Attributes

static DataType _type
static const UInt32 uiTest

Detailed Description

template<>
struct osg::FieldDataTraits< Color4ub >

Definition at line 339 of file OSGBaseFieldDataType.h.


Member Typedef Documentation

typedef osgIF<uiTest == 1, const Color4ub , const Color4ub & >::_IRet osg::FieldTraitsRecurseBase< Color4ub >::ArgumentType [inherited]

Definition at line 122 of file OSGFieldDataType.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
StringConvertable 

Definition at line 344 of file OSGBaseFieldDataType.h.

anonymous enum [inherited]

Definition at line 114 of file OSGFieldDataType.h.

00114 { bHasParent = 0x00 };

anonymous enum [inherited]
Enumerator:
ToStringConvertable 
FromStringConvertable 

Definition at line 69 of file OSGFieldDataType.h.

00070     {
00071         ToStringConvertable   = 0x01,
00072         FromStringConvertable = 0x02
00073     };


Member Function Documentation

static DataType& osg::FieldDataTraits< Color4ub >::getType ( void   )  [inline, static]

Definition at line 347 of file OSGBaseFieldDataType.h.

00347 { return _type;         }

static const Char8* osg::FieldDataTraits< Color4ub >::getSName ( void   )  [inline, static]

Definition at line 349 of file OSGBaseFieldDataType.h.

00349 { return "SFColor4ub";  }

static const Char8* osg::FieldDataTraits< Color4ub >::getMName ( void   )  [inline, static]

Definition at line 351 of file OSGBaseFieldDataType.h.

00351 { return "MFColor4ub";  }

static Color4ub osg::FieldDataTraits< Color4ub >::getDefault ( void   )  [inline, static]

Definition at line 353 of file OSGBaseFieldDataType.h.

00353 { return Color4ub();    }

static bool osg::FieldDataTraits< Color4ub >::getFromString ( Color4ub outVal,
const Char8 *&  inVal 
) [inline, static]

Definition at line 355 of file OSGBaseFieldDataType.h.

References osg::Color4< ValueTypeT >::setValue().

00357     {
00358         outVal.setValue(inVal);
00359 
00360         return true;
00361     }

static void osg::FieldDataTraits< Color4ub >::putToString ( const Color4ub inVal,
std::string &  outStr 
) [inline, static]

Reimplemented from osg::FieldTraitsRecurseBase< Color4ub >.

Definition at line 363 of file OSGBaseFieldDataType.h.

References osg::Color4< ValueTypeT >::alpha(), osg::Color4< ValueTypeT >::blue(), osg::Color4< ValueTypeT >::green(), and osg::Color4< ValueTypeT >::red().

00365     {
00366         typedef TypeTraits<Color4ub::ValueType> TypeTrait;
00367 
00368         outStr.assign(TypeTrait::putToString(inVal.red()  ));
00369         outStr.append(" ");
00370         outStr.append(TypeTrait::putToString(inVal.green()));
00371         outStr.append(" ");
00372         outStr.append(TypeTrait::putToString(inVal.blue() ));
00373         outStr.append(" ");
00374         outStr.append(TypeTrait::putToString(inVal.alpha()));
00375     }

static UInt32 osg::FieldDataTraits< Color4ub >::getBinSize ( const Color4ub  )  [inline, static]

Reimplemented from osg::FieldTraitsRecurseBase< Color4ub >.

Definition at line 377 of file OSGBaseFieldDataType.h.

00378     {
00379         return sizeof(UInt8) * 4;
00380     }

static UInt32 osg::FieldDataTraits< Color4ub >::getBinSize ( const Color4ub ,
UInt32  uiNumObjects 
) [inline, static]

Reimplemented from osg::FieldTraitsRecurseBase< Color4ub >.

Definition at line 382 of file OSGBaseFieldDataType.h.

00384     {
00385         return sizeof(UInt8) * 4 * uiNumObjects;
00386     }

static void osg::FieldDataTraits< Color4ub >::copyToBin ( BinaryDataHandler pMem,
const Color4ub oObject 
) [inline, static]

Reimplemented from osg::FieldTraitsRecurseBase< Color4ub >.

Definition at line 388 of file OSGBaseFieldDataType.h.

References osg::BinaryDataHandler::putValues().

00390     {
00391         pMem.putValues(&oObject[0], 4);
00392     }

static void osg::FieldDataTraits< Color4ub >::copyFromBin ( BinaryDataHandler pMem,
Color4ub oObject 
) [inline, static]

Reimplemented from osg::FieldTraitsRecurseBase< Color4ub >.

Definition at line 395 of file OSGBaseFieldDataType.h.

References osg::BinaryDataHandler::getValues().

00397     {
00398         pMem.getValues(&oObject[0], 4);
00399     }

static void osg::FieldDataTraits< Color4ub >::copyToBin ( BinaryDataHandler pMem,
const Color4ub pObjectStore,
UInt32  uiNumObjects 
) [inline, static]

Reimplemented from osg::FieldTraitsRecurseBase< Color4ub >.

Definition at line 402 of file OSGBaseFieldDataType.h.

References osg::BinaryDataHandler::putValues().

00405     {
00406         pMem.putValues(&pObjectStore[0][0], uiNumObjects*4);
00407     }

static void osg::FieldDataTraits< Color4ub >::copyFromBin ( BinaryDataHandler pMem,
Color4ub pObjectStore,
UInt32  uiNumObjects 
) [inline, static]

Reimplemented from osg::FieldTraitsRecurseBase< Color4ub >.

Definition at line 409 of file OSGBaseFieldDataType.h.

References osg::BinaryDataHandler::getValues().

00412     {
00413         pMem.getValues(&pObjectStore[0][0], uiNumObjects*4);
00414     }

static bool osg::FieldTraitsRecurseBase< Color4ub >::getFromString ( Color4ub outVal,
const Char8 *  inVal 
) [inline, static, inherited]

Definition at line 209 of file OSGFieldDataType.h.

00211     {
00212         typedef FieldDataTraits<FieldTypeT> MappedTrait;
00213 
00214         return MappedTrait::getFromString(outVal, inVal);
00215     }

static const Char8* osg::FieldTraits::getPName ( void   )  [inline, static, inherited]

Definition at line 75 of file OSGFieldDataType.h.

00075 { return "Field"; }


Member Data Documentation

Definition at line 342 of file OSGBaseFieldDataType.h.

const UInt32 osg::FieldTraitsRecurseBase< Color4ub >::uiTest [static, inherited]

Definition at line 117 of file OSGFieldDataType.h.


The documentation for this struct was generated from the following files:

Generated on 8 Feb 2010 for OpenSG by  doxygen 1.6.1