Changeset 1145
- Timestamp:
- 04/10/08 21:19:34 (1 month ago)
- Files:
-
- trunk/Source/Base/Field/OSGFieldType.h (modified) (2 diffs)
- trunk/Source/System/FieldContainer/Fields/PointerFields/OSGChildPointerMField.h (modified) (1 diff)
- trunk/Source/System/FieldContainer/Fields/PointerFields/OSGChildPointerSField.h (modified) (1 diff)
- trunk/Source/System/FieldContainer/Fields/PointerFields/OSGParentPointerMField.h (modified) (7 diffs)
- trunk/Source/System/FieldContainer/Fields/PointerFields/OSGParentPointerMField.inl (modified) (4 diffs)
- trunk/Source/System/FieldContainer/Fields/PointerFields/OSGParentPointerMFieldBase.h (deleted)
- trunk/Source/System/FieldContainer/Fields/PointerFields/OSGParentPointerMFieldBase.inl (deleted)
- trunk/Source/System/FieldContainer/Fields/PointerFields/OSGParentPointerSField.h (modified) (6 diffs)
- trunk/Source/System/FieldContainer/Fields/PointerFields/OSGParentPointerSField.inl (modified) (4 diffs)
- trunk/Source/System/FieldContainer/Fields/PointerFields/OSGParentPointerSFieldBase.h (deleted)
- trunk/Source/System/FieldContainer/Fields/PointerFields/OSGParentPointerSFieldBase.inl (deleted)
- trunk/Source/System/FieldContainer/Fields/PointerFields/OSGUnrecordedPointerMField.h (modified) (3 diffs)
- trunk/Source/System/FieldContainer/Fields/PointerFields/OSGUnrecordedPointerMFieldBase.h (deleted)
- trunk/Source/System/FieldContainer/Fields/PointerFields/OSGUnrecordedPointerMFieldBase.inl (deleted)
- trunk/Source/System/FieldContainer/Fields/PointerFields/OSGUnrecordedPointerSField.h (modified) (4 diffs)
- trunk/Source/System/FieldContainer/Fields/PointerFields/OSGUnrecordedPointerSFieldBase.h (deleted)
- trunk/Source/System/FieldContainer/Fields/PointerFields/OSGUnrecordedPointerSFieldBase.inl (deleted)
- trunk/Source/System/FieldContainer/Fields/PointerFields/OSGWeakPointerMField.h (modified) (4 diffs)
- trunk/Source/System/FieldContainer/Fields/PointerFields/OSGWeakPointerMFieldBase.h (deleted)
- trunk/Source/System/FieldContainer/Fields/PointerFields/OSGWeakPointerMFieldBase.inl (deleted)
- trunk/Source/System/FieldContainer/Fields/PointerFields/OSGWeakPointerSField.h (modified) (4 diffs)
- trunk/Source/System/FieldContainer/Fields/PointerFields/OSGWeakPointerSFieldBase.h (deleted)
- trunk/Source/System/FieldContainer/Fields/PointerFields/OSGWeakPointerSFieldBase.inl (deleted)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Source/Base/Field/OSGFieldType.h
r1144 r1145 78 78 79 79 80 #if 081 enum Class82 {83 ValueField = OSG::ValueField,84 PtrField = OSG::PtrField,85 ParentPtrField = OSG::ParentPtrField,86 ChildPtrField = OSG::ChildPtrField87 #ifndef OSG_DELETE_LATER88 ,WeakPtrField = OSG::WeakPtrField89 #endif90 };91 #else92 80 enum Class 93 81 { … … 96 84 ParentPtrField, 97 85 ChildPtrField 86 #ifndef OSG_DELETE_LATER 87 ,WeakPtrField 88 #endif 98 89 }; 99 #endif100 90 101 91 /*---------------------------------------------------------------------*/ trunk/Source/System/FieldContainer/Fields/PointerFields/OSGChildPointerMField.h
r1144 r1145 350 350 NamespaceI > MFieldTraits; 351 351 typedef FieldDescription<MFieldTraits, 352 MultiField,352 FieldType::MultiField, 353 353 UnrecordedRefCountPolicy, 354 ChildPtrField> Description;354 FieldType::ChildPtrField> Description; 355 355 356 356 // handles trunk/Source/System/FieldContainer/Fields/PointerFields/OSGChildPointerSField.h
r1144 r1145 122 122 NamespaceI > SFieldTraits; 123 123 typedef FieldDescription<SFieldTraits, 124 SingleField,124 FieldType::SingleField, 125 125 UnrecordedRefCountPolicy, 126 ChildPtrField> Description;126 FieldType::ChildPtrField> Description; 127 127 128 128 // handles trunk/Source/System/FieldContainer/Fields/PointerFields/OSGParentPointerMField.h
r1144 r1145 8 8 9 9 #include "OSGConfig.h" 10 #include "OSGParentPointerMFieldBase.h" 10 #include "OSGPointerMFieldCommon.h" 11 #include "OSGPointerAccessHandler.h" 11 12 #include "OSGPointerFieldConfigs.h" 12 //#include "OSGEditParentPointerMFieldHandle.h"13 //#include "OSGGetParentPointerMFieldHandle.h"14 13 15 14 #ifdef OSG_DOC_FILES_IN_MODULE … … 206 205 template <class ObjectTypeT, 207 206 Int32 NamespaceI = 0> 208 class ParentPointerMField : public ParentPointerMFieldBase<NamespaceI> 207 class ParentPointerMField 208 : public PointerMFieldCommon<NoRefCountAccessHandler, NamespaceI> 209 209 { 210 210 /*========================== PUBLIC =================================*/ … … 216 216 typedef ObjectTypeT ObjectType; 217 217 218 typedef ParentPointerMFieldBase<NamespaceI > Inherited; 218 typedef PointerMFieldCommon<NoRefCountAccessHandler, 219 NamespaceI > Inherited; 219 220 typedef ParentPointerMField <ObjectTypeT, 220 221 NamespaceI > Self; … … 232 233 typedef typename FieldConfig::ConstPtrType const_pointer; 233 234 typedef typename FieldConfig::MFieldConstRefType const_reference; 235 236 typedef UInt16 IdStoredType; 237 typedef MFieldVector<IdStoredType> IdStoreType; 238 typedef typename IdStoreType::iterator IdStoreItType; 239 typedef typename IdStoreType::const_iterator IdStoreConstItType; 240 241 typedef FieldTraits<IdStoredType > IdBaseTraitsType; 242 243 typedef typename Inherited::size_type size_type; 244 typedef typename Inherited::difference_type difference_type; 234 245 235 246 typedef FieldTraits <ValueType, … … 237 248 238 249 typedef FieldDescription<MFieldTraits, 239 MultiField,250 FieldType::MultiField, 240 251 NoRefCountPolicy, 241 ParentPtrField> Description;252 FieldType::ParentPtrField> Description; 242 253 243 254 // handles … … 302 313 /*! \} */ 303 314 /*---------------------------------------------------------------------*/ 315 /*! \name IdStore Interface */ 316 /*! \{ */ 317 318 // reading values 319 UInt16 const idStoreGet(UInt32 const index) const; 320 UInt16 const idStoreGet(IdStoreItType pos ) const; 321 UInt16 const idStoreGet(IdStoreConstItType pos ) const; 322 323 // adding values 324 void idStoreAppend (UInt16 const newId ); 325 void idStoreInsert (UInt32 const index, 326 UInt16 const newId ); 327 void idStoreInsert (IdStoreItType pos, 328 UInt16 const newId ); 329 template <class InputIteratorT> 330 void idStoreInsert (IdStoreItType pos, 331 InputIteratorT first, 332 InputIteratorT last ); 333 // changing values 334 void idStoreReplace(UInt32 const index, 335 UInt16 const newId ); 336 void idStoreReplace(IdStoreItType pos, 337 UInt16 const newId ); 338 339 // removing values 340 void idStoreErase (UInt32 const index ); 341 void idStoreErase (IdStoreItType pos ); 342 void idStoreErase (UInt32 const beginIndex, 343 UInt32 const endIndex ); 344 void idStoreErase (IdStoreItType begin, 345 IdStoreItType end ); 346 void idStoreClear (void ); 347 348 // finding values 349 Int32 idStoreFindIndex(UInt16 const fieldId) const; 350 IdStoreItType idStoreFind (UInt16 const fieldId); 351 IdStoreConstItType idStoreFind (UInt16 const fieldId) const; 352 353 /*! \} */ 354 /*---------------------------------------------------------------------*/ 355 /*! \name Raw IdStore Access */ 356 /*! \{ */ 357 358 IdStoreType &editRawIdStore(void); 359 IdStoreType const &getRawIdStore (void) const; 360 361 /*! \} */ 362 /*---------------------------------------------------------------------*/ 363 /*! \name Std library interface */ 364 /*! \{ */ 365 366 void reserve(size_type size); 367 368 /*! \} */ 369 /*---------------------------------------------------------------------*/ 370 /*! \name Binary IO */ 371 /*! \{ */ 372 373 UInt32 getBinSize (void ) const; 374 void copyToBin (BinaryDataHandler &pMem) const; 375 void copyFromBin(BinaryDataHandler &pMem); 376 377 /*! \} */ 378 /*---------------------------------------------------------------------*/ 379 /*! \name MT Sync */ 380 /*! \{ */ 381 382 void syncWith (Self &source, 383 ConstFieldMaskArg syncMode, 384 UInt32 uiSyncInfo, 385 AspectOffsetStore &oOffsets ); 386 void beginEdit (UInt32 uiAspect, 387 AspectOffsetStore &oOffsets ); 388 Self *resolveShare (UInt32 uiAspect, 389 AspectOffsetStore &oOffsets ); 390 void terminateShare(UInt32 uiAspect, 391 AspectOffsetStore &oOffsets ); 392 bool isShared (void ); 393 394 /*! \} */ 395 /*---------------------------------------------------------------------*/ 304 396 /*! \name Index Operator */ 305 397 /*! \{ */ … … 314 406 /*! \{ */ 315 407 316 static FieldType _fieldType; 408 static FieldType _fieldType; 409 IdStoreType _childIdStore; 317 410 318 411 /*! \} */ trunk/Source/System/FieldContainer/Fields/PointerFields/OSGParentPointerMField.inl
r1139 r1145 285 285 NamespaceI >::ParentPointerMField(void) 286 286 287 : Inherited() 287 : Inherited(), 288 _childIdStore() 288 289 { 289 290 } … … 295 296 NamespaceI >::ParentPointerMField(Self const &source) 296 297 297 : Inherited(source) 298 : Inherited(source), 299 _childIdStore(source._childIdStore) 298 300 { 299 301 } … … 305 307 NamespaceI >::ParentPointerMField(UInt32 const size) 306 308 307 : Inherited(size) 309 : Inherited(size), 310 _childIdStore(size) 308 311 { 309 312 } … … 388 391 389 392 /*-------------------------------------------------------------------------*/ 393 /* IdStore Interface */ 394 395 /*-------------------------------------------------------------------------*/ 396 /* Reading Values */ 397 398 template <class ObjectTypeT, Int32 NamespaceI> 399 inline UInt16 const 400 ParentPointerMField<ObjectTypeT, NamespaceI>::idStoreGet(UInt32 const index) const 401 { 402 return _childIdStore[index]; 403 } 404 405 template <class ObjectTypeT, Int32 NamespaceI> 406 inline UInt16 const 407 ParentPointerMField<ObjectTypeT, NamespaceI>::idStoreGet(IdStoreItType pos) const 408 { 409 return *pos; 410 } 411 412 template <class ObjectTypeT, Int32 NamespaceI> 413 inline UInt16 const 414 ParentPointerMField<ObjectTypeT, NamespaceI>::idStoreGet( 415 IdStoreConstItType pos) const 416 { 417 return *pos; 418 } 419 420 /*-------------------------------------------------------------------------*/ 421 /* Adding Values */ 422 423 template <class ObjectTypeT, Int32 NamespaceI> 424 inline void 425 ParentPointerMField<ObjectTypeT, NamespaceI>::idStoreAppend(UInt16 const newId) 426 { 427 _childIdStore.push_back(newId); 428 } 429 430 template <class ObjectTypeT, Int32 NamespaceI> 431 inline void 432 ParentPointerMField<ObjectTypeT, NamespaceI>::idStoreInsert( 433 UInt32 const index, UInt16 const newId) 434 { 435 _childIdStore.insert(_childIdStore.begin() + index, newId); 436 } 437 438 template <class ObjectTypeT, Int32 NamespaceI> 439 inline void 440 ParentPointerMField<ObjectTypeT, NamespaceI>::idStoreInsert( 441 IdStoreItType pos, UInt16 const newId) 442 { 443 _childIdStore.insert(pos, newId); 444 } 445 446 template <class ObjectTypeT, Int32 NamespaceI > 447 template <class InputIteratorT> 448 inline void 449 ParentPointerMField<ObjectTypeT, NamespaceI>::idStoreInsert( 450 IdStoreItType pos, InputIteratorT first, InputIteratorT last) 451 { 452 _childIdStore.insert(pos, first, last); 453 } 454 455 /*-------------------------------------------------------------------------*/ 456 /* Changing Values */ 457 458 template <class ObjectTypeT, Int32 NamespaceI> 459 inline void 460 ParentPointerMField<ObjectTypeT, NamespaceI>::idStoreReplace( 461 UInt32 const index, UInt16 const newId) 462 { 463 IdStoreItType sI = _childIdStore.begin() + index; 464 465 *sI = newId; 466 } 467 468 template <class ObjectTypeT, Int32 NamespaceI> 469 inline void 470 ParentPointerMField<ObjectTypeT, NamespaceI>::idStoreReplace( 471 IdStoreItType pos, UInt16 const newId) 472 { 473 *pos = newId; 474 } 475 476 /*-------------------------------------------------------------------------*/ 477 /* Removing Values */ 478 479 template <class ObjectTypeT, Int32 NamespaceI> 480 inline void 481 ParentPointerMField<ObjectTypeT, NamespaceI>::idStoreErase(UInt32 const index) 482 { 483 idStoreErase(_childIdStore.begin() + index); 484 } 485 486 template <class ObjectTypeT, Int32 NamespaceI> 487 inline void 488 ParentPointerMField<ObjectTypeT, NamespaceI>::idStoreErase(IdStoreItType pos) 489 { 490 _childIdStore.erase(pos); 491 } 492 493 template <class ObjectTypeT, Int32 NamespaceI> 494 inline void 495 ParentPointerMField<ObjectTypeT, NamespaceI>::idStoreErase( 496 UInt32 const beginIndex, UInt32 const endIndex) 497 { 498 idStoreErase(_childIdStore.begin() + beginIndex, 499 _childIdStore.begin() + endIndex ); 500 } 501 502 template <class ObjectTypeT, Int32 NamespaceI> 503 inline void 504 ParentPointerMField<ObjectTypeT, NamespaceI>::idStoreErase( 505 IdStoreItType begin, IdStoreItType end) 506 { 507 _childIdStore.erase(begin, end); 508 } 509 510 template <class ObjectTypeT, Int32 NamespaceI> 511 inline void 512 ParentPointerMField<ObjectTypeT, NamespaceI>::idStoreClear(void) 513 { 514 _childIdStore.clear(); 515 } 516 517 /*-------------------------------------------------------------------------*/ 518 /* Finding Values */ 519 520 template <class ObjectTypeT, Int32 NamespaceI> 521 inline Int32 522 ParentPointerMField<ObjectTypeT, NamespaceI>::idStoreFindIndex( 523 UInt16 const fieldId) const 524 { 525 IdStoreConstItType sI = std::find(_childIdStore.begin(), 526 _childIdStore.end (), fieldId); 527 528 if(sI != _childIdStore.end()) 529 { 530 return std::distance(_childIdStore.begin(), sI); 531 } 532 else 533 { 534 return -1; 535 } 536 } 537 538 template <class ObjectTypeT, Int32 NamespaceI> 539 inline typename ParentPointerMField<ObjectTypeT, NamespaceI>::IdStoreItType 540 ParentPointerMField<ObjectTypeT, NamespaceI>::idStoreFind(UInt16 const fieldId) 541 { 542 return std::find(_childIdStore.begin(), 543 _childIdStore.end (), fieldId); 544 } 545 546 template <class ObjectTypeT, Int32 NamespaceI> 547 inline typename ParentPointerMField<ObjectTypeT, NamespaceI>::IdStoreConstItType 548 ParentPointerMField<ObjectTypeT, NamespaceI>::idStoreFind( 549 UInt16 const fieldId) const 550 { 551 return std::find(_childIdStore.begin(), 552 _childIdStore.end (), fieldId); 553 } 554 555 /*-------------------------------------------------------------------------*/ 556 /* Raw IdStore Access */ 557 558 template <class ObjectTypeT, Int32 NamespaceI> 559 inline typename ParentPointerMField<ObjectTypeT, NamespaceI>::IdStoreType & 560 ParentPointerMField<ObjectTypeT, NamespaceI>::editRawIdStore(void) 561 { 562 return _childIdStore; 563 } 564 565 template <class ObjectTypeT, Int32 NamespaceI> 566 inline typename ParentPointerMField<ObjectTypeT, NamespaceI>::IdStoreType const & 567 ParentPointerMField<ObjectTypeT, NamespaceI>::getRawIdStore (void) const 568 { 569 return _childIdStore; 570 } 571 572 /*-------------------------------------------------------------------------*/ 573 /* Std library interface */ 574 575 template <class ObjectTypeT, Int32 NamespaceI> 576 inline void 577 ParentPointerMField<ObjectTypeT, NamespaceI>::reserve(size_type size) 578 { 579 this->editRawStore ().reserve(size); 580 this->editRawIdStore().reserve(size); 581 } 582 583 /*-------------------------------------------------------------------------*/ 584 /* Binary IO */ 585 586 template <class ObjectTypeT, Int32 NamespaceI> 587 inline UInt32 588 ParentPointerMField<ObjectTypeT, NamespaceI>::getBinSize(void) const 589 { 590 return Inherited::getBinSize() + 591 IdBaseTraitsType::getBinSize(&(this->getRawIdStore().front()), 592 this->getRawIdStore().size () ); 593 } 594 595 template <class ObjectTypeT, Int32 NamespaceI> 596 inline void 597 ParentPointerMField<ObjectTypeT, NamespaceI>::copyToBin( 598 BinaryDataHandler &pMem) const 599 { 600 UInt32 thisSize = this->getRawIdStore().size(); 601 602 Inherited::copyToBin(pMem); 603 604 if(thisSize > 0) 605 { 606 IdBaseTraitsType::copyToBin( 607 pMem, &(this->getRawIdStore().front()), thisSize); 608 } 609 } 610 611 template <class ObjectTypeT, Int32 NamespaceI> 612 inline void 613 ParentPointerMField<ObjectTypeT, NamespaceI>::copyFromBin( 614 BinaryDataHandler &pMem) 615 { 616 Inherited::copyFromBin(pMem); 617 618 UInt32 newSize = this->ptrStoreSize(); 619 620 this->editRawIdStore().clear(); 621 622 if(newSize > 0) 623 { 624 this->editRawIdStore().resize(newSize); 625 626 IdBaseTraitsType::copyFromBin( 627 pMem, &(this->editRawIdStore().front()), newSize); 628 } 629 } 630 631 /*-------------------------------------------------------------------------*/ 632 /* MT Sync */ 633 634 template <class ObjectTypeT, Int32 NamespaceI> 635 inline void 636 ParentPointerMField<ObjectTypeT, NamespaceI>::syncWith( 637 Self &source, ConstFieldMaskArg syncMode, 638 UInt32 uiSyncInfo, AspectOffsetStore &oOffsets ) 639 { 640 Inherited::syncWith(source, syncMode, uiSyncInfo, oOffsets); 641 642 _childIdStore = source._childIdStore; 643 } 644 645 template <class ObjectTypeT, Int32 NamespaceI> 646 inline void 647 ParentPointerMField<ObjectTypeT, NamespaceI>::beginEdit( 648 UInt32, AspectOffsetStore &) 649 { 650 // nothing to do 651 } 652 653 template <class ObjectTypeT, Int32 NamespaceI> 654 inline typename ParentPointerMField<ObjectTypeT, NamespaceI>::Self * 655 ParentPointerMField<ObjectTypeT, NamespaceI>::resolveShare( 656 UInt32 uiAspect, AspectOffsetStore &oOffsets) 657 { 658 return Inherited::resolveShare(uiAspect, oOffsets); 659 } 660 661 template <class ObjectTypeT, Int32 NamespaceI> 662 inline void 663 ParentPointerMField<ObjectTypeT, NamespaceI>::terminateShare( 664 UInt32, AspectOffsetStore &) 665 { 666 // nothing to do 667 } 668 669 template <class ObjectTypeT, Int32 NamespaceI> 670 inline bool 671 ParentPointerMField<ObjectTypeT, NamespaceI>::isShared(void) 672 { 673 return Inherited::isShared(); 674 } 675 676 /*-------------------------------------------------------------------------*/ 390 677 /* Index Operator */ 391 678 trunk/Source/System/FieldContainer/Fields/PointerFields/OSGParentPointerSField.h
r1144 r1145 8 8 9 9 #include "OSGConfig.h" 10 #include "OSGParentPointerSFieldBase.h" 10 #include "OSGPointerSFieldCommon.h" 11 #include "OSGPointerAccessHandler.h" 11 12 #include "OSGPointerFieldConfigs.h" 12 13 //#include "OSGEditParentPointerSFieldHandle.h" … … 95 96 template <class ObjectTypeT, 96 97 Int32 NamespaceI = 0> 97 class ParentPointerSField : public ParentPointerSFieldBase<NamespaceI> 98 class ParentPointerSField 99 : public PointerSFieldCommon<NoRefCountAccessHandler, NamespaceI> 98 100 { 99 101 /*========================== PUBLIC =================================*/ … … 105 107 typedef ObjectTypeT ObjectType; 106 108 107 typedef ParentPointerSFieldBase<NamespaceI > Inherited; 109 typedef PointerSFieldCommon <NoRefCountAccessHandler, 110 NamespaceI > Inherited; 108 111 typedef ParentPointerSField <ObjectTypeT, 109 112 NamespaceI > Self; … … 119 122 typedef typename FieldConfig::SFieldConstRefType const_reference; 120 123 121 typedef typename Inherited::IdStoredType IdStoredType; 124 typedef UInt16 IdStoredType; 125 typedef UInt16 &IdStoredTypeRef; 126 typedef UInt16 const &IdStoredTypeConstRef; 127 128 typedef FieldTraits<IdStoredType > IdBaseTraitsType; 122 129 123 130 typedef FieldTraits <ValueType, 124 131 NamespaceI > SFieldTraits; 125 132 typedef FieldDescription<SFieldTraits, 126 SingleField,133 FieldType::SingleField, 127 134 NoRefCountPolicy, 128 ParentPtrField > Description;135 FieldType::ParentPtrField > Description; 129 136 130 137 // handles … … 176 183 /*! \} */ 177 184 /*---------------------------------------------------------------------*/ 185 /*! \name IdStore Interface */ 186 /*! \{ */ 187 188 // reading values 189 UInt16 const idStoreGet(void) const; 190 191 // changing values 192 void idStoreSet (UInt16 const newId); 193 void idStoreClear(void ); 194 195 /*! \} */ 196 /*---------------------------------------------------------------------*/ 197 /*! \name Raw IdStore Access */ 198 /*! \{ */ 199 200 IdStoredTypeRef editRawIdStore(void); 201 IdStoredTypeConstRef getRawIdStore (void) const; 202 203 /*! \} */ 204 /*---------------------------------------------------------------------*/ 205 /*! \name Binary IO */ 206 /*! \{ */ 207 208 UInt32 getBinSize (void ) const; 209 void copyToBin (BinaryDataHandler &pMem) const; 210 void copyFromBin(BinaryDataHandler &pMem); 211 212 /*! \} */ 213 /*---------------------------------------------------------------------*/ 214 /*! \name MT Sync */ 215 /*! \{ */ 216 217 void syncWith(Self &source); 218 219 /*! \} */ 220 /*---------------------------------------------------------------------*/ 178 221 /*! \name Access */ 179 222 /*! \{ */ … … 183 226 /*! \} */ 184 227 /*========================= PROTECTED ===============================*/ 228 185 229 protected: 230 186 231 /*---------------------------------------------------------------------*/ 187 232 /*! \name Members */ 188 233 /*! \{ */ 189 234 190 static FieldType _fieldType; 191 235 static FieldType _fieldType; 236 IdStoredType _childIdValue; 237 192 238 /*! \} */ 193 239 /*========================== PRIVATE ================================*/ 240 194 241 private: 195 242 }; trunk/Source/System/FieldContainer/Fields/PointerFields/OSGParentPointerSField.inl
r1135 r1145 105 105 ParentPointerSField<ObjectTypeT, 106 106 NamespaceI >::ParentPointerSField(void) 107 : Inherited() 107 : Inherited(), 108 _childIdValue() 108 109 { 109 110 // nothing to do … … 114 115 ParentPointerSField<ObjectTypeT, 115 116 NamespaceI >::ParentPointerSField(Self const &source) 116 : Inherited(source) 117 : Inherited(source), 118 _childIdValue(source._childIdValue) 117 119 { 118 120 // nothing to do … … 125 127 ValueType ptrValue, IdStoredType idValue) 126 128 127 : Inherited(ptrValue, idValue) 129 : Inherited(ptrValue), 130 _childIdValue(idValue ) 128 131 { 129 132 // nothing to do … … 139 142 { 140 143 // nothing to do 144 } 145 146 /*-------------------------------------------------------------------------*/ 147 /* IdStore Interface */ 148 149 /*-------------------------------------------------------------------------*/ 150 /* Reading Values */ 151 152 template <class ObjectTypeT, Int32 NamespaceI> 153 inline UInt16 const 154 ParentPointerSField<ObjectTypeT, NamespaceI>::idStoreGet(void) const 155 { 156 return _childIdValue; 157 } 158 159 /*-------------------------------------------------------------------------*/ 160 /* Changing Values */ 161 162 template <class ObjectTypeT, Int32 NamespaceI> 163 inline void 164 ParentPointerSField<ObjectTypeT, NamespaceI>::idStoreSet(UInt16 const newId) 165 { 166 _childIdValue = newId; 167 } 168 169 template <class ObjectTypeT, Int32 NamespaceI> 170 inline void 171 ParentPointerSField<ObjectTypeT, NamespaceI>::idStoreClear(void) 172 { 173 _childIdValue = 0; 174 } 175 176 /*-------------------------------------------------------------------------*/ 177 /* Raw IdStore Access */ 178 179 template <class ObjectTypeT, Int32 NamespaceI> 180 inline typename ParentPointerSField<ObjectTypeT, NamespaceI>::IdStoredTypeRef 181 ParentPointerSField<ObjectTypeT, NamespaceI>::editRawIdStore(void) 182 { 183 return _childIdValue; 184 } 185 186 template <class ObjectTypeT, Int32 NamespaceI> 187 inline typename ParentPointerSField<ObjectTypeT, NamespaceI>::IdStoredTypeConstRef 188 ParentPointerSField<ObjectTypeT, NamespaceI>::getRawIdStore (void) const 189 { 190 return _childIdValue; 191 } 192 193 /*-------------------------------------------------------------------------*/ 194 /* Binary IO */ 195 196 template <class ObjectTypeT, Int32 NamespaceI> 197 inline UInt32 198 ParentPointerSField<ObjectTypeT, NamespaceI>::getBinSize(void) const 199 { 200 return 201 Inherited::getBinSize() + IdBaseTraitsType::getBinSize(_childIdValue); 202 } 203 204 template <class ObjectTypeT, Int32 NamespaceI> 205 inline void 206 ParentPointerSField<ObjectTypeT, NamespaceI>::copyToBin( 207 BinaryDataHandler &pMem) const 208 { 209 Inherited::copyToBin(pMem); 210 211 IdBaseTraitsType::copyToBin(pMem, _childIdValue); 212 } 213 214 template <class ObjectTypeT, Int32 NamespaceI> 215 inline void 216 ParentPointerSField<ObjectTypeT, NamespaceI>::copyFromBin( 217 BinaryDataHandler &pMem) 218 { 219 Inherited::copyFromBin(pMem); 220 221 IdBaseTraitsType::copyFromBin(pMem, _childIdValue); 222 } 223 224 /*-------------------------------------------------------------------------*/ 225 /* MT Sync */ 226 227 template <class ObjectTypeT, Int32 NamespaceI> 228 inline void 229 ParentPointerSField<ObjectTypeT, NamespaceI>::syncWith(Self &source) 230 { 231 Inherited::syncWith(source); 232 233 _childIdValue = source._childIdValue; 141 234 } 142 235 trunk/Source/System/FieldContainer/Fields/PointerFields/OSGUnrecordedPointerMField.h
r1144 r1145 9 9 10 10 #include "OSGConfig.h" 11 #include "OSGUnrecordedPointerMFieldBase.h" 11 #include "OSGPointerMFieldCommon.h" 12 #include "OSGPointerAccessHandler.h" 12 13 #include "OSGPointerFieldConfigs.h" 13 //#include "OSGEditPointerMFieldHandle.h"14 //#include "OSGGetPointerMFieldHandle.h"15 14 16 15 #ifdef OSG_DOC_FILES_IN_MODULE … … 306 305 Int32 NamespaceI = 0> 307 306 class UnrecordedPointerMField : 308 public PointerMFieldCommon<UnrecordedAccessHandler, 0>307 public PointerMFieldCommon<UnrecordedAccessHandler, NamespaceI> 309 308 { 310 309 /*========================== PUBLIC =================================*/ … … 346 345 NamespaceI > MFieldTraits; 347 346 typedef FieldDescription<MFieldTraits, 348 MultiField,347 FieldType::MultiField, 349 348 UnrecordedRefCountPolicy, 350 PtrField > Description;349 FieldType::PtrField > Description; 351 350 352 351 // handles trunk/Source/System/FieldContainer/Fields/PointerFields/OSGUnrecordedPointerSField.h
r1144 r1145 8 8 9 9 #include "OSGConfig.h" 10 #include "OSGUnrecordedPointerSFieldBase.h" 10 #include "OSGPointerSFieldCommon.h" 11 #include "OSGPointerAccessHandler.h" 11 12 #include "OSGPointerFieldConfigs.h" 12 //#include "OSGEditPointerSFieldHandle.h"13 //#include "OSGGetPointerSFieldHandle.h"14 13 15 14 #ifdef OSG_DOC_FILES_IN_MODULE … … 89 88 template <class ObjectTypeT, 90 89 Int32 NamespaceI = 0> 91 class UnrecordedPointerSField : public UnrecordedPointerSFieldBase<NamespaceI> 90 class UnrecordedPointerSField :
