osg::osg::FieldDataTraits2< bool > Struct Template Reference
[Field Data Traits]

#include <OSGSysFieldDataType.h>

Inheritance diagram for osg::osg::FieldDataTraits2< bool >:

osg::FieldTraitsIntegralRecurseMapper< bool > osg::FieldTraitsRecurseBase< bool > osg::FieldTraits

List of all members.

Public Types

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

Static Public Member Functions

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

Static Public Attributes

static DataType _type
static const UInt32 uiTest


Detailed Description

template<>
struct osg::osg::FieldDataTraits2< bool >

Definition at line 67 of file OSGSysFieldDataType.h.


Member Typedef Documentation

typedef FieldDataTraits2<bool> osg::osg::FieldDataTraits2< bool >::Self

Definition at line 75 of file OSGSysFieldDataType.h.

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

Definition at line 122 of file OSGFieldDataType.h.


Member Enumeration Documentation

anonymous enum

Enumerator:
StringConvertable 

Definition at line 78 of file OSGSysFieldDataType.h.

00078                      { StringConvertable = Self::ToStringConvertable   | 
00079                                            Self::FromStringConvertable };

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::osg::FieldDataTraits2< bool >::getType ( void   )  [inline, static]

Definition at line 81 of file OSGSysFieldDataType.h.

00081 { return _type;               }

static Char8* osg::osg::FieldDataTraits2< bool >::getSName ( void   )  [inline, static]

Definition at line 83 of file OSGSysFieldDataType.h.

00083 { return "SFBool";            }

static Char8* osg::osg::FieldDataTraits2< bool >::getMName ( void   )  [inline, static]

Definition at line 84 of file OSGSysFieldDataType.h.

00084 { return "MFBool";            }

static bool osg::osg::FieldDataTraits2< bool >::getDefault ( void   )  [inline, static]

Definition at line 86 of file OSGSysFieldDataType.h.

00086 { return false;               }

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

Definition at line 88 of file OSGSysFieldDataType.h.

00090     {
00091         if(inVal == NULL)
00092             return false;
00093 
00094         if(inVal[0] == 'T' || inVal[0] == 't')
00095         {
00096             if(inVal[1] != 'R' && inVal[1] != 'r')
00097             {
00098                 return false;
00099             }
00100 
00101             if(inVal[2] != 'U' && inVal[2] != 'u')
00102             {
00103                 return false;
00104             }
00105 
00106             if(inVal[3] != 'E' && inVal[3] != 'e')
00107             {
00108                 return false;
00109             }
00110 
00111             outVal = true;
00112         }
00113         else if(inVal[0] == 'F' || inVal[0] == 'f')
00114         {
00115             if(inVal[1] != 'A' && inVal[1] != 'a')
00116             {
00117                 return false;
00118             }
00119 
00120             if(inVal[2] != 'L' && inVal[2] != 'l')
00121             {
00122                 return false;
00123             }
00124 
00125             if(inVal[3] != 'S' && inVal[3] != 's')
00126             {
00127                 return false;
00128             }
00129 
00130             if(inVal[4] != 'E' && inVal[4] != 'e')
00131             {
00132                 return false;
00133             }
00134 
00135             outVal = false;
00136         }
00137         else
00138         {
00139             return false;
00140         }
00141         
00142         return outVal;
00143     }

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

Reimplemented from osg::FieldTraitsRecurseBase< bool >.

Definition at line 145 of file OSGSysFieldDataType.h.

00147     {
00148         if( inVal == true )
00149         {
00150             outStr.assign("TRUE");
00151         }
00152         else
00153         {
00154             outStr.assign("FALSE");
00155         }
00156     }

static UInt32 osg::osg::FieldDataTraits2< bool >::getBinSize ( const bool &   )  [inline, static]

Reimplemented from osg::FieldTraitsIntegralRecurseMapper< bool >.

Definition at line 159 of file OSGSysFieldDataType.h.

00160     {
00161         return sizeof(UInt8);
00162     }

static void osg::osg::FieldDataTraits2< bool >::copyToBin ( BinaryDataHandler pMem,
const bool &  oObject 
) [inline, static]

Reimplemented from osg::FieldTraitsIntegralRecurseMapper< bool >.

Definition at line 164 of file OSGSysFieldDataType.h.

References osg::BinaryDataHandler::putValue().

00166     {
00167         UInt8 value=oObject;
00168         pMem.putValue(value);
00169     }

static void osg::osg::FieldDataTraits2< bool >::copyFromBin ( BinaryDataHandler pMem,
bool &  oObject 
) [inline, static]

Reimplemented from osg::FieldTraitsIntegralRecurseMapper< bool >.

Definition at line 171 of file OSGSysFieldDataType.h.

References osg::BinaryDataHandler::getValue().

00173     {
00174         UInt8 value;
00175         pMem.getValue(value);
00176         oObject=value;
00177     }

static UInt32 osg::FieldTraitsIntegralRecurseMapper< bool >::getBinSize ( const bool *  ,
UInt32  uiNumObjects 
) [inline, static, inherited]

Reimplemented from osg::FieldTraitsRecurseBase< bool >.

Definition at line 370 of file OSGFieldDataType.h.

00372     {
00373         return sizeof(FieldTypeT) * uiNumObjects;
00374     }

static void osg::FieldTraitsIntegralRecurseMapper< bool >::copyToBin ( BinaryDataHandler pMem,
const bool *  pObjectStore,
UInt32  uiNumObjects 
) [inline, static, inherited]

Reimplemented from osg::FieldTraitsRecurseBase< bool >.

Definition at line 382 of file OSGFieldDataType.h.

00385     {
00386         pMem.putValues(&pObjectStore[0], uiNumObjects);
00387     }

static void osg::FieldTraitsIntegralRecurseMapper< bool >::copyFromBin ( BinaryDataHandler pMem,
bool *  pObjectStore,
UInt32  uiNumObjects 
) [inline, static, inherited]

Reimplemented from osg::FieldTraitsRecurseBase< bool >.

Definition at line 395 of file OSGFieldDataType.h.

00398     {
00399         pMem.getValues(&pObjectStore[0], uiNumObjects);
00400     }

static bool osg::FieldTraitsRecurseBase< bool >::getFromString ( bool &  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

DataType osg::osg::FieldDataTraits2< bool >::_type [static]

Definition at line 73 of file OSGSysFieldDataType.h.

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

Definition at line 117 of file OSGFieldDataType.h.


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

Generated on Mon Mar 17 12:03:31 2008 for OpenSG by  doxygen 1.5.5