Ticket #49: NFIO_Attachment_unfinished.diff
| File NFIO_Attachment_unfinished.diff, 5.6 kB (added by cneumann, 2 years ago) |
|---|
-
Source/System/FieldContainer/Base/OSGFieldContainerAttachment.h
old new 140 140 /*! \name Binary Access */ 141 141 /*! \{ */ 142 142 143 virtual UInt32 getBinSize (ConstFieldMaskArg whichField); 144 virtual void copyToBin (BinaryDataHandler &pMem, 145 ConstFieldMaskArg whichField); 146 virtual void copyFromBin(BinaryDataHandler &pMem, 147 ConstFieldMaskArg whichField); 148 143 149 /*! \} */ 144 150 /*---------------------------------------------------------------------*/ 145 151 /*! \name your_operators */ -
Source/System/FieldContainer/Base/OSGFieldContainerAttachment.cpp
old new 49 49 50 50 OSG_USING_NAMESPACE 51 51 52 /*-------------------------------------------------------------------------*/ 53 /* Binary Access */ 54 55 UInt32 56 FieldContainerAttachment::getBinSize(ConstFieldMaskArg whichField) 57 { 58 UInt32 returnValue = Inherited::getBinSize(whichField); 59 60 if(FieldBits::NoField != (ParentsFieldMask & whichField)) 61 { 62 returnValue += _mfParents.getBinSize(); 63 } 64 65 if(FieldBits::NoField != (InternalFieldMask & whichField)) 66 { 67 returnValue += _sfInternal.getBinSize(); 68 } 69 70 return returnValue; 71 } 72 73 void 74 FieldContainerAttachment::copyToBin(BinaryDataHandler &pMem, 75 ConstFieldMaskArg whichField) 76 { 77 Inherited::copyToBin(pMem, whichField); 78 79 if(FieldBits::NoField != (ParentsFieldMask & whichField)) 80 { 81 _mfParents.copyToBin(pMem); 82 } 83 84 if(FieldBits::NoField != (InternalFieldMask & whichField)) 85 { 86 _sfInternal.copyToBin(pMem); 87 } 88 } 89 90 void 91 FieldContainerAttachment::copyFromBin(BinaryDataHandler &pMem, 92 ConstFieldMaskArg whichField) 93 { 94 Inherited::copyFromBin(pMem, whichField); 95 96 if(FieldBits::NoField != (ParentsFieldMask & whichField)) 97 { 98 _mfParents.copyFromBin(pMem); 99 } 100 101 if(FieldBits::NoField != (InternalFieldMask & whichField)) 102 { 103 _sfInternal.copyFromBin(pMem); 104 } 105 } 106 107 /*-------------------------------------------------------------------------*/ 108 /* Fields */ 109 52 110 void FieldContainerAttachment::classDescInserter(TypeObject &oType) 53 111 { 54 112 Inherited::classDescInserter(oType); -
Source/System/FieldContainer/Mixins/OSGSimpleAttachment.inl
old new 194 194 UInt32 SimpleAttachment<AttachmentDescT>::getBinSize( 195 195 ConstFieldMaskArg whichField) 196 196 { 197 return 0; 197 UInt32 returnValue = Inherited::getBinSize(whichField); 198 199 if(FieldBits::NoField != (SimpleFieldMask & whichField)) 200 { 201 returnValue += _field.getBinSize(); 202 } 203 204 return returnValue; 198 205 } 199 206 200 207 … … 203 210 BinaryDataHandler &pMem, 204 211 ConstFieldMaskArg whichField) 205 212 { 213 Inherited::copyToBin(pMem, whichField); 214 215 if(FieldBits::NoField != (SimpleFieldMask & whichField)) 216 { 217 _field.copyToBin(pMem); 218 } 206 219 } 207 220 208 221 template <class AttachmentDescT> inline … … 210 223 BinaryDataHandler &pMem, 211 224 ConstFieldMaskArg whichField) 212 225 { 226 Inherited::copyFromBin(pMem, whichField); 227 228 if(FieldBits::NoField != (SimpleFieldMask & whichField)) 229 { 230 _field.copyFromBin(pMem); 231 } 213 232 } 214 233 215 234 template <class AttachmentDescT> inline -
Source/Base/Field/OSGSysFieldTraits.h
old new 576 576 static Char8 *getMName (void) { return "MFVoidP"; } 577 577 578 578 static void *getDefault (void) { return NULL; } 579 580 // Binary 581 582 // TODO Is it correct to just ignore these for binary ?? 583 584 static UInt32 getBinSize(void * const &) 585 { 586 return 0; 587 } 588 589 static UInt32 getBinSize(void* const*, 590 UInt32 ) 591 { 592 return 0; 593 } 594 595 static void copyToBin(BinaryDataHandler &, 596 void * const & ) 597 { 598 } 599 600 static void copyToBin(BinaryDataHandler &, 601 void * const *, 602 UInt32 ) 603 { 604 } 605 606 static void copyFromBin(BinaryDataHandler &, 607 void * const & ) 608 { 609 } 610 611 static void copyFromBin(BinaryDataHandler &, 612 void * const *, 613 UInt32 ) 614 { 615 } 579 616 }; 580 617 581 618 #endif // !defined(OSG_DO_DOC) || (OSG_DOC_LEVEL >= 3)
