#include <OSGAttachmentMapFieldDataType.h>
Inheritance diagram for osg::FieldTraitsRecurseMapper< AttachmentMap, false >:

Public Types | |
| enum | { bHasParent = 0x00 } |
| typedef osgIF< uiTest==1, const AttachmentMap, const AttachmentMap & >::_IRet | ArgumentType |
Static Public Member Functions | |
| static UInt32 | getBinSize (const AttachmentMap &oObject) |
| static UInt32 | getBinSize (const AttachmentMap *pObjectStore, UInt32 uiNumObjects) |
| static void | copyToBin (BinaryDataHandler &pMem, const AttachmentMap &pObject) |
| static void | copyToBin (BinaryDataHandler &pMem, const AttachmentMap *pObjectStore, UInt32 uiNumObjects) |
| static void | copyFromBin (BinaryDataHandler &pMem, AttachmentMap &pObject) |
| static void | copyFromBin (BinaryDataHandler &pMem, AttachmentMap *pObjectStore, UInt32 uiNumObjects) |
| static bool | getFromString (AttachmentMap &outVal, const Char8 *inVal) |
| static void | putToString (const AttachmentMap &inVal, std::string &outStr) |
| static const Char8 * | getPName (void) |
Static Public Attributes | |
| static const UInt32 | uiTest |
Definition at line 69 of file OSGAttachmentMapFieldDataType.h.
|
|
Definition at line 122 of file OSGFieldDataType.h. |
|
|
Reimplemented from osg::FieldTraits. Definition at line 72 of file OSGAttachmentMapFieldDataType.h. 00072 { bHasParent = 0x00 };
|
|
|
Reimplemented from osg::FieldTraitsRecurseBase< AttachmentMap >. Definition at line 74 of file OSGAttachmentMapFieldDataType.h. 00075 { 00076 AttachmentMap::const_iterator mapIt = oObject.begin(); 00077 AttachmentMap::const_iterator mapEnd = oObject.end(); 00078 00079 UInt32 uiNumPublicObjects = 0; 00080 00081 while(mapIt != mapEnd) 00082 { 00083 if(mapIt->second->getInternal().getValue() == false) 00084 { 00085 ++uiNumPublicObjects; 00086 } 00087 00088 ++mapIt; 00089 } 00090 00091 return sizeof(UInt32) + // Number of elements in the map 00092 uiNumPublicObjects * (sizeof(UInt16) + sizeof(UInt32)); 00093 }
|
|
||||||||||||
|
Reimplemented from osg::FieldTraitsRecurseBase< AttachmentMap >. Definition at line 95 of file OSGAttachmentMapFieldDataType.h. 00097 { 00098 UInt32 size = 0; 00099 00100 // defaut: individual field sizes 00101 for(UInt32 i = 0; i < uiNumObjects; ++i) 00102 { 00103 size += getBinSize(pObjectStore[i]); 00104 } 00105 00106 return size; 00107 }
|
|
||||||||||||
|
Reimplemented from osg::FieldTraitsRecurseBase< AttachmentMap >. Definition at line 109 of file OSGAttachmentMapFieldDataType.h. References osg::BinaryDataHandler::putValue(). 00111 { 00112 UInt16 binding; 00113 UInt32 id; 00114 UInt32 uiNumPublicObjects = 0; 00115 00116 AttachmentMap::const_iterator mapIt = pObject.begin(); 00117 AttachmentMap::const_iterator mapEnd = pObject.end(); 00118 00119 while(mapIt != mapEnd) 00120 { 00121 if(mapIt->second->getInternal().getValue() == false) 00122 { 00123 ++uiNumPublicObjects; 00124 } 00125 00126 ++mapIt; 00127 } 00128 00129 pMem.putValue(uiNumPublicObjects); 00130 00131 mapIt = pObject.begin(); 00132 00133 for(; mapIt != mapEnd; ++mapIt) 00134 { 00135 if(mapIt->second->getInternal().getValue() == false) 00136 { 00137 binding = mapIt->first & 0xffff; 00138 id = mapIt->second.getFieldContainerId(); 00139 00140 pMem.putValue(binding); 00141 pMem.putValue(id); 00142 } 00143 } 00144 }
|
|
||||||||||||||||
|
Reimplemented from osg::FieldTraitsRecurseBase< AttachmentMap >. Definition at line 146 of file OSGAttachmentMapFieldDataType.h. 00149 { 00150 for(UInt32 i = 0; i < uiNumObjects; ++i) 00151 { 00152 copyToBin(pMem, pObjectStore[i]); 00153 } 00154 }
|
|
||||||||||||
|
Reimplemented from osg::FieldTraitsRecurseBase< AttachmentMap >. Definition at line 156 of file OSGAttachmentMapFieldDataType.h. References osg::BinaryDataHandler::getValue(). 00158 { 00159 FieldContainerPtr fcp; 00160 00161 UInt32 key; 00162 UInt16 binding; 00163 UInt32 id; 00164 UInt32 size; 00165 00166 pMem.getValue(size); 00167 00168 pObject.clear(); 00169 00170 for(UInt32 i = 0; i < size; ++i) 00171 { 00172 pMem.getValue(binding); 00173 pMem.getValue(id); 00174 00175 fcp = FieldContainerFactory::the()->getMappedContainer(id); 00176 00177 key = (UInt32 (fcp->getGroupId()) << 16) | binding; 00178 00179 ((FieldContainerPtr &) pObject[key]) = fcp; 00180 } 00181 }
|
|
||||||||||||||||
|
Reimplemented from osg::FieldTraitsRecurseBase< AttachmentMap >. Definition at line 183 of file OSGAttachmentMapFieldDataType.h. 00186 { 00187 for(UInt32 i = 0; i < uiNumObjects; ++i) 00188 { 00189 copyFromBin(pMem, pObjectStore[i]); 00190 } 00191 }
|
|
||||||||||||
|
Definition at line 209 of file OSGFieldDataType.h. 00211 { 00212 typedef FieldDataTraits<FieldTypeT> MappedTrait; 00213 00214 return MappedTrait::getFromString(outVal, inVal); 00215 }
|
|
||||||||||||
|
Reimplemented in osg::FieldDataTraits< AttachmentMap >. Definition at line 217 of file OSGFieldDataType.h. 00219 { 00220 typedef FieldDataTraits<FieldTypeT> MappedTrait; 00221 00222 MappedTrait::putToString(inVal, outStr); 00223 }
|
|
|
Definition at line 75 of file OSGFieldDataType.h.
|
|
|
Definition at line 117 of file OSGFieldDataType.h. |
1.4.3