osg::FieldDataTraits1< QBit > Struct Template Reference

QBit field traits.

#include <OSGQBit.h>

Inheritance diagram for osg::FieldDataTraits1< QBit >:
osg::FieldTraitsIntegralRecurseMapper< QBit > osg::FieldTraitsRecurseBase< QBit > osg::FieldTraits

List of all members.

Public Types

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

Static Public Member Functions

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

Static Public Attributes

static DataType _type
static const UInt32 uiTest

Detailed Description

template<>
struct osg::FieldDataTraits1< QBit >

Definition at line 33 of file OSGQBit.h.


Member Typedef Documentation

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

Definition at line 122 of file OSGFieldDataType.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
StringConvertable 

Definition at line 38 of file OSGQBit.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::FieldDataTraits1< QBit >::getType ( void   )  [inline, static]

Definition at line 41 of file OSGQBit.h.

00041 { return _type;               }

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

Definition at line 43 of file OSGQBit.h.

00043 { return "SFQBit";            }

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

Definition at line 44 of file OSGQBit.h.

00044 { return "MFQBit";            }

static QBit osg::FieldDataTraits1< QBit >::getDefault ( void   )  [inline, static]

Definition at line 46 of file OSGQBit.h.

00046 { return 0;                   }

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

Definition at line 48 of file OSGQBit.h.

00050     {
00051         if(inVal == NULL)
00052             return 0;
00053 
00054         if(inVal[0] == 'T' || inVal[0] == 't')
00055         {
00056             if(inVal[1] != 'R' && inVal[1] != 'r')
00057             {
00058                 return 0;
00059             }
00060 
00061             if(inVal[2] != 'U' && inVal[2] != 'u')
00062             {
00063                 return 0;
00064             }
00065 
00066             if(inVal[3] != 'E' && inVal[3] != 'e')
00067             {
00068                 return 0;
00069             }
00070 
00071             outVal = 1;
00072         }
00073         else if(inVal[0] == 'F' || inVal[0] == 'f')
00074         {
00075             if(inVal[1] != 'A' && inVal[1] != 'a')
00076             {
00077                 return 0;
00078             }
00079 
00080             if(inVal[2] != 'L' && inVal[2] != 'l')
00081             {
00082                 return 0;
00083             }
00084 
00085             if(inVal[3] != 'S' && inVal[3] != 's')
00086             {
00087                 return 0;
00088             }
00089 
00090             if(inVal[4] != 'E' && inVal[4] != 'e')
00091             {
00092                 return 0;
00093             }
00094 
00095             outVal = 0;
00096         }
00097         else if(inVal[0] == 'A' || inVal[0] == 'a')
00098         {
00099             if(inVal[1] != 'U' && inVal[1] != 'u')
00100             {
00101                 return 0;
00102             }
00103 
00104             if(inVal[2] != 'T' && inVal[2] != 't')
00105             {
00106                 return 0;
00107             }
00108 
00109             if(inVal[3] != 'O' && inVal[3] != 'o')
00110             {
00111                 return 0;
00112             }
00113 
00114             outVal = 2;
00115         }
00116         else
00117         {
00118             return 0;
00119         }
00120         
00121         return outVal;
00122     }

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

Reimplemented from osg::FieldTraitsRecurseBase< QBit >.

Definition at line 125 of file OSGQBit.h.

00127     {
00128         if(inVal == 1)
00129         {
00130             outStr.assign("TRUE");
00131         }
00132         else if(inVal == 0)
00133         {
00134             outStr.assign("FALSE");
00135         }
00136         else
00137         {
00138             outStr.assign("AUTO");
00139         }
00140     }

static UInt32 osg::FieldTraitsIntegralRecurseMapper< QBit >::getBinSize ( const QBit &   )  [inline, static, inherited]

Reimplemented from osg::FieldTraitsRecurseBase< QBit >.

Definition at line 365 of file OSGFieldDataType.h.

00366     {
00367         return sizeof(FieldTypeT);
00368     }

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

Reimplemented from osg::FieldTraitsRecurseBase< QBit >.

Definition at line 370 of file OSGFieldDataType.h.

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

static void osg::FieldTraitsIntegralRecurseMapper< QBit >::copyToBin ( BinaryDataHandler pMem,
const QBit &  oObject 
) [inline, static, inherited]

Reimplemented from osg::FieldTraitsRecurseBase< QBit >.

Definition at line 376 of file OSGFieldDataType.h.

00378     {
00379         pMem.putValue(oObject);
00380     }

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

Reimplemented from osg::FieldTraitsRecurseBase< QBit >.

Definition at line 382 of file OSGFieldDataType.h.

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

static void osg::FieldTraitsIntegralRecurseMapper< QBit >::copyFromBin ( BinaryDataHandler pMem,
QBit &  oObject 
) [inline, static, inherited]

Reimplemented from osg::FieldTraitsRecurseBase< QBit >.

Definition at line 389 of file OSGFieldDataType.h.

00391     {
00392         pMem.getValue(oObject);
00393     }

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

Reimplemented from osg::FieldTraitsRecurseBase< QBit >.

Definition at line 395 of file OSGFieldDataType.h.

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

static bool osg::FieldTraitsRecurseBase< QBit >::getFromString ( QBit &  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 36 of file OSGQBit.h.

const UInt32 osg::FieldTraitsRecurseBase< QBit >::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