Show
Ignore:
Timestamp:
12/12/07 18:00:42 (9 months ago)
Author:
cneumann
Message:

added: generic interface
changed: factory functions return RefPtr?

The unittests don't pass right now, because of the change
to the factory functions, which leads to containers
being immediately destroyed as they are not assigned to
a RefPtr?.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/Carsten_PtrWork2/Source/Contrib/VTK/OSGVTKMapperBase.cpp

    r1020 r1032  
    132132*/ 
    133133 
    134  
     134     
    135135void VTKMapperBase::classDescInserter(TypeObject &oType) 
    136136{ 
    137137    FieldDescriptionBase *pDesc = NULL; 
    138  
    139138 
    140139    pDesc = new SFNodeInternalPtr::Description( 
     
    142141        "root", 
    143142        "", 
    144         RootFieldId, RootFieldMask, 
     143        RootFieldId, 
     144        RootFieldMask, 
    145145        false, 
    146146        Field::SFDefaultFlags, 
    147147        static_cast<FieldEditMethodSig>(&VTKMapperBase::editHandleRoot), 
    148         static_cast<FieldGetMethodSig >(&VTKMapperBase::getHandleRoot)); 
    149  
    150     oType.addInitialDesc(pDesc); 
    151  
     148        static_cast<FieldGetMethodSig >(&VTKMapperBase::getHandleRoot ) ); 
     149         
     150        oType.addInitialDesc(pDesc); 
     151         
     152         
    152153    pDesc = new MFNodeInternalPtr::Description( 
    153154        MFNodeInternalPtr::getClassType(), 
    154155        "geoRoots", 
    155156        "", 
    156         GeoRootsFieldId, GeoRootsFieldMask, 
     157        GeoRootsFieldId, 
     158        GeoRootsFieldMask, 
    157159        false, 
    158160        (Field::FClusterLocal), 
    159161        static_cast<FieldEditMethodSig>(&VTKMapperBase::editHandleGeoRoots), 
    160         static_cast<FieldGetMethodSig >(&VTKMapperBase::getHandleGeoRoots)); 
    161  
    162     oType.addInitialDesc(pDesc); 
    163  
     162        static_cast<FieldGetMethodSig >(&VTKMapperBase::getHandleGeoRoots ) ); 
     163         
     164        oType.addInitialDesc(pDesc); 
     165         
     166         
    164167    pDesc = new MFGeometryInternalPtr::Description( 
    165168        MFGeometryInternalPtr::getClassType(), 
    166169        "geometries", 
    167170        "", 
    168         GeometriesFieldId, GeometriesFieldMask, 
     171        GeometriesFieldId, 
     172        GeometriesFieldMask, 
    169173        false, 
    170174        (Field::FClusterLocal), 
    171175        static_cast<FieldEditMethodSig>(&VTKMapperBase::editHandleGeometries), 
    172         static_cast<FieldGetMethodSig >(&VTKMapperBase::getHandleGeometries)); 
    173  
    174     oType.addInitialDesc(pDesc); 
    175  
     176        static_cast<FieldGetMethodSig >(&VTKMapperBase::getHandleGeometries ) ); 
     177         
     178        oType.addInitialDesc(pDesc); 
     179         
     180         
    176181    pDesc = new MFChunkMaterialInternalPtr::Description( 
    177182        MFChunkMaterialInternalPtr::getClassType(), 
    178183        "materials", 
    179184        "", 
    180         MaterialsFieldId, MaterialsFieldMask, 
     185        MaterialsFieldId, 
     186        MaterialsFieldMask, 
    181187        false, 
    182188        (Field::FClusterLocal), 
    183189        static_cast<FieldEditMethodSig>(&VTKMapperBase::editHandleMaterials), 
    184         static_cast<FieldGetMethodSig >(&VTKMapperBase::getHandleMaterials)); 
    185  
    186     oType.addInitialDesc(pDesc); 
    187  
     190        static_cast<FieldGetMethodSig >(&VTKMapperBase::getHandleMaterials ) ); 
     191         
     192        oType.addInitialDesc(pDesc); 
     193         
     194         
    188195    pDesc = new MFMaterialChunkInternalPtr::Description( 
    189196        MFMaterialChunkInternalPtr::getClassType(), 
    190197        "materialChunks", 
    191198        "", 
    192         MaterialChunksFieldId, MaterialChunksFieldMask, 
     199        MaterialChunksFieldId, 
     200        MaterialChunksFieldMask, 
    193201        false, 
    194202        (Field::FClusterLocal), 
    195203        static_cast<FieldEditMethodSig>(&VTKMapperBase::editHandleMaterialChunks), 
    196         static_cast<FieldGetMethodSig >(&VTKMapperBase::getHandleMaterialChunks)); 
    197  
    198     oType.addInitialDesc(pDesc); 
    199  
     204        static_cast<FieldGetMethodSig >(&VTKMapperBase::getHandleMaterialChunks ) ); 
     205         
     206        oType.addInitialDesc(pDesc); 
     207         
     208         
    200209    pDesc = new MFGeoPnt3fPropertyInternalPtr::Description( 
    201210        MFGeoPnt3fPropertyInternalPtr::getClassType(), 
    202211        "positions", 
    203212        "", 
    204         PositionsFieldId, PositionsFieldMask, 
     213        PositionsFieldId, 
     214        PositionsFieldMask, 
    205215        false, 
    206216        (Field::FClusterLocal), 
    207217        static_cast<FieldEditMethodSig>(&VTKMapperBase::editHandlePositions), 
    208         static_cast<FieldGetMethodSig >(&VTKMapperBase::getHandlePositions)); 
    209  
    210     oType.addInitialDesc(pDesc); 
    211  
     218        static_cast<FieldGetMethodSig >(&VTKMapperBase::getHandlePositions ) ); 
     219         
     220        oType.addInitialDesc(pDesc); 
     221         
     222         
    212223    pDesc = new MFGeoUInt32PropertyInternalPtr::Description( 
    213224        MFGeoUInt32PropertyInternalPtr::getClassType(), 
    214225        "length", 
    215226        "", 
    216         LengthFieldId, LengthFieldMask, 
     227        LengthFieldId, 
     228        LengthFieldMask, 
    217229        false, 
    218230        (Field::FClusterLocal), 
    219231        static_cast<FieldEditMethodSig>(&VTKMapperBase::editHandleLength), 
    220         static_cast<FieldGetMethodSig >(&VTKMapperBase::getHandleLength)); 
    221  
    222     oType.addInitialDesc(pDesc); 
    223  
     232        static_cast<FieldGetMethodSig >(&VTKMapperBase::getHandleLength ) ); 
     233         
     234        oType.addInitialDesc(pDesc); 
     235         
     236         
    224237    pDesc = new MFGeoUInt8PropertyInternalPtr::Description( 
    225238        MFGeoUInt8PropertyInternalPtr::getClassType(), 
    226239        "types", 
    227240        "", 
    228         TypesFieldId, TypesFieldMask, 
     241        TypesFieldId, 
     242        TypesFieldMask, 
    229243        false, 
    230244        (Field::FClusterLocal), 
    231245        static_cast<FieldEditMethodSig>(&VTKMapperBase::editHandleTypes), 
    232         static_cast<FieldGetMethodSig >(&VTKMapperBase::getHandleTypes)); 
    233  
    234     oType.addInitialDesc(pDesc); 
    235  
     246        static_cast<FieldGetMethodSig >(&VTKMapperBase::getHandleTypes ) ); 
     247         
     248        oType.addInitialDesc(pDesc); 
     249         
     250         
    236251    pDesc = new MFGeoColor4fPropertyInternalPtr::Description( 
    237252        MFGeoColor4fPropertyInternalPtr::getClassType(), 
    238253        "Colors", 
    239254        "", 
    240         ColorsFieldId, ColorsFieldMask, 
     255        ColorsFieldId, 
     256        ColorsFieldMask, 
    241257        false, 
    242258        (Field::FClusterLocal), 
    243259        static_cast<FieldEditMethodSig>(&VTKMapperBase::editHandleColors), 
    244         static_cast<FieldGetMethodSig >(&VTKMapperBase::getHandleColors)); 
    245  
    246     oType.addInitialDesc(pDesc); 
    247  
     260        static_cast<FieldGetMethodSig >(&VTKMapperBase::getHandleColors ) ); 
     261         
     262        oType.addInitialDesc(pDesc); 
     263         
     264         
    248265    pDesc = new MFGeoVec3fPropertyInternalPtr::Description( 
    249266        MFGeoVec3fPropertyInternalPtr::getClassType(), 
    250267        "normals", 
    251268        "", 
    252         NormalsFieldId, NormalsFieldMask, 
     269        NormalsFieldId, 
     270        NormalsFieldMask, 
    253271        false, 
    254272        (Field::FClusterLocal), 
    255273        static_cast<FieldEditMethodSig>(&VTKMapperBase::editHandleNormals), 
    256         static_cast<FieldGetMethodSig >(&VTKMapperBase::getHandleNormals)); 
    257  
    258     oType.addInitialDesc(pDesc); 
    259 
    260  
     274        static_cast<FieldGetMethodSig >(&VTKMapperBase::getHandleNormals ) ); 
     275         
     276        oType.addInitialDesc(pDesc); 
     277         
     278         
     279
    261280 
    262281VTKMapperBase::TypeObject VTKMapperBase::_type( 
     
    384403    "" 
    385404    ); 
    386  
     405     
    387406/*------------------------------ get -----------------------------------*/ 
    388407 
     
    459478} 
    460479 
    461 void 
     480bool 
    462481VTKMapperBase::replaceGeoRoots( 
    463482    MFNodeInternalPtr::ArgumentType pOldElem, 
    464483    MFNodeInternalPtr::ArgumentType pNewElem ) 
    465484{ 
    466     if(pNewElem == NullFC) 
    467         return; 
     485    bool retVal = false; 
     486 
     487    if(pNewElem != NullFC) 
     488        return retVal; 
    468489 
    469490    GeoRootsFieldType::iterator fieldIt = 
     
    472493    if(fieldIt != _mfGeoRoots.end()) 
    473494    { 
     495        retVal = true; 
     496     
    474497        editMField(GeoRootsFieldMask, _mfGeoRoots); 
    475498         
    476499        (*fieldIt) = NodePtr(pNewElem); 
    477500    } 
     501     
     502    return retVal; 
    478503} 
    479504 
     
    493518} 
    494519 
    495 void 
     520bool 
    496521VTKMapperBase::subGeoRoots( 
    497522    MFNodeInternalPtr::ArgumentType value) 
    498523{ 
     524    bool retVal = false; 
    499525    GeoRootsFieldType::iterator fieldIt = 
    500526        _mfGeoRoots.find(value); 
     
    502528    if(fieldIt != _mfGeoRoots.end()) 
    503529    { 
     530        retVal = true; 
     531     
    504532        editMField(GeoRootsFieldMask, _mfGeoRoots); 
    505533         
    506534        _mfGeoRoots.erase(fieldIt); 
    507535    } 
     536     
     537    return retVal; 
    508538} 
    509539 
     
    571601} 
    572602 
    573 void 
     603bool 
    574604VTKMapperBase::replaceGeometries( 
    575605    MFGeometryInternalPtr::ArgumentType pOldElem, 
    576606    MFGeometryInternalPtr::ArgumentType pNewElem ) 
    577607{ 
    578     if(pNewElem == NullFC) 
    579         return; 
     608    bool retVal = false; 
     609 
     610    if(pNewElem != NullFC) 
     611        return retVal; 
    580612 
    581613    GeometriesFieldType::iterator fieldIt = 
     
    584616    if(fieldIt != _mfGeometries.end()) 
    585617    { 
     618        retVal = true; 
     619     
    586620        editMField(GeometriesFieldMask, _mfGeometries); 
    587621         
    588622        (*fieldIt) = GeometryPtr(pNewElem); 
    589623    } 
     624     
     625    return retVal; 
    590626} 
    591627 
     
    605641} 
    606642 
    607 void 
     643bool 
    608644VTKMapperBase::subGeometries( 
    609645    MFGeometryInternalPtr::ArgumentType value) 
    610646{ 
     647    bool retVal = false; 
    611648    GeometriesFieldType::iterator fieldIt = 
    612649        _mfGeometries.find(value); 
     
    614651    if(fieldIt != _mfGeometries.end()) 
    615652    { 
     653        retVal = true; 
     654     
    616655        editMField(GeometriesFieldMask, _mfGeometries); 
    617656         
    618657        _mfGeometries.erase(fieldIt); 
    619658    } 
     659     
     660    return retVal; 
    620661} 
    621662 
     
    683724} 
    684725 
    685 void 
     726bool 
    686727VTKMapperBase::replaceMaterials( 
    687728    MFChunkMaterialInternalPtr::ArgumentType pOldElem, 
    688729    MFChunkMaterialInternalPtr::ArgumentType pNewElem ) 
    689730{ 
    690     if(pNewElem == NullFC) 
    691         return; 
     731    bool retVal = false; 
     732 
     733    if(pNewElem != NullFC) 
     734        return retVal; 
    692735 
    693736    MaterialsFieldType::iterator fieldIt = 
     
    696739    if(fieldIt != _mfMaterials.end()) 
    697740    { 
     741        retVal = true; 
     742     
    698743        editMField(MaterialsFieldMask, _mfMaterials); 
    699744         
    700745        (*fieldIt) = ChunkMaterialPtr(pNewElem); 
    701746    } 
     747     
     748    return retVal; 
    702749} 
    703750 
     
    717764} 
    718765 
    719 void 
     766bool 
    720767VTKMapperBase::subMaterials( 
    721768    MFChunkMaterialInternalPtr::ArgumentType value) 
    722769{ 
     770    bool retVal = false; 
    723771    MaterialsFieldType::iterator fieldIt = 
    724772        _mfMaterials.find(value); 
     
    726774    if(fieldIt != _mfMaterials.end()) 
    727775    { 
     776        retVal = true; 
     777     
    728778        editMField(MaterialsFieldMask, _mfMaterials); 
    729779         
    730780        _mfMaterials.erase(fieldIt); 
    731781    } 
     782     
     783    return retVal; 
    732784} 
    733785 
     
    795847} 
    796848 
    797 void 
     849bool 
    798850VTKMapperBase::replaceMaterialChunks( 
    799851    MFMaterialChunkInternalPtr::ArgumentType pOldElem, 
    800852    MFMaterialChunkInternalPtr::ArgumentType pNewElem ) 
    801853{ 
    802     if(pNewElem == NullFC) 
    803         return; 
     854    bool retVal = false; 
     855 
     856    if(pNewElem != NullFC) 
     857        return retVal; 
    804858 
    805859    MaterialChunksFieldType::iterator fieldIt = 
     
    808862    if(fieldIt != _mfMaterialChunks.end()) 
    809863    { 
     864        retVal = true; 
     865     
    810866        editMField(MaterialChunksFieldMask, _mfMaterialChunks); 
    811867         
    812868        (*fieldIt) = MaterialChunkPtr(pNewElem); 
    813869    } 
     870     
     871    return retVal; 
    814872} 
    815873 
     
    829887} 
    830888 
    831 void 
     889bool 
    832890VTKMapperBase::subMaterialChunks( 
    833891    MFMaterialChunkInternalPtr::ArgumentType value) 
    834892{ 
     893    bool retVal = false; 
    835894    MaterialChunksFieldType::iterator fieldIt = 
    836895        _mfMaterialChunks.find(value); 
     
    838897    if(fieldIt != _mfMaterialChunks.end()) 
    839898    { 
     899        retVal = true; 
     900     
    840901        editMField(MaterialChunksFieldMask, _mfMaterialChunks); 
    841902         
    842903        _mfMaterialChunks.erase(fieldIt); 
    843904    } 
     905     
     906    return retVal; 
    844907} 
    845908 
     
    907970} 
    908971 
    909 void 
     972bool 
    910973VTKMapperBase::replacePositions( 
    911974    MFGeoPnt3fPropertyInternalPtr::ArgumentType pOldElem, 
    912975    MFGeoPnt3fPropertyInternalPtr::ArgumentType pNewElem ) 
    913976{ 
    914     if(pNewElem == NullFC) 
    915         return; 
     977    bool retVal = false; 
     978 
     979    if(pNewElem != NullFC) 
     980        return retVal; 
    916981 
    917982    PositionsFieldType::iterator fieldIt = 
     
    920985    if(fieldIt != _mfPositions.end()) 
    921986    { 
     987        retVal = true; 
     988     
    922989        editMField(PositionsFieldMask, _mfPositions); 
    923990         
    924991        (*fieldIt) = GeoPnt3fPropertyPtr(pNewElem); 
    925992    } 
     993     
     994    return retVal; 
    926995} 
    927996 
     
    9411010} 
    9421011 
    943 void 
     1012bool 
    9441013VTKMapperBase::subPositions( 
    9451014    MFGeoPnt3fPropertyInternalPtr::ArgumentType value) 
    9461015{ 
     1016    bool retVal = false; 
    9471017    PositionsFieldType::iterator fieldIt = 
    9481018        _mfPositions.find(value); 
     
    9501020    if(fieldIt != _mfPositions.end()) 
    9511021    { 
     1022        retVal = true; 
     1023     
    9521024        editMField(PositionsFieldMask, _mfPositions); 
    9531025         
    9541026        _mfPositions.erase(fieldIt); 
    9551027    } 
     1028     
     1029    return retVal; 
    9561030} 
    9571031 
     
    10191093} 
    10201094 
    1021 void 
     1095bool 
    10221096VTKMapperBase::replaceLength( 
    10231097    MFGeoUInt32PropertyInternalPtr::ArgumentType pOldElem, 
    10241098    MFGeoUInt32PropertyInternalPtr::ArgumentType pNewElem ) 
    10251099{ 
    1026     if(pNewElem == NullFC) 
    1027         return; 
     1100    bool retVal = false; 
     1101 
     1102    if(pNewElem != NullFC) 
     1103        return retVal; 
    10281104 
    10291105    LengthFieldType::iterator fieldIt = 
     
    10321108    if(fieldIt != _mfLength.end()) 
    10331109    { 
     1110        retVal = true; 
     1111     
    10341112        editMField(LengthFieldMask, _mfLength); 
    10351113         
    10361114        (*fieldIt) = GeoUInt32PropertyPtr(pNewElem); 
    10371115    } 
     1116     
     1117    return retVal; 
    10381118} 
    10391119 
     
    10531133} 
    10541134 
    1055 void 
     1135bool 
    10561136VTKMapperBase::subLength( 
    10571137    MFGeoUInt32PropertyInternalPtr::ArgumentType value) 
    10581138{ 
     1139    bool retVal = false; 
    10591140    LengthFieldType::iterator fieldIt = 
    10601141        _mfLength.find(value); 
     
    10621143    if(fieldIt != _mfLength.end()) 
    10631144    { 
     1145        retVal = true; 
     1146     
    10641147        editMField(LengthFieldMask, _mfLength); 
    10651148         
    10661149        _mfLength.erase(fieldIt); 
    10671150    } 
     1151     
     1152    return retVal; 
    10681153} 
    10691154 
     
    11311216} 
    11321217 
    1133 void 
     1218bool 
    11341219VTKMapperBase::replaceTypes( 
    11351220    MFGeoUInt8PropertyInternalPtr::ArgumentType pOldElem, 
    11361221    MFGeoUInt8PropertyInternalPtr::ArgumentType pNewElem ) 
    11371222{ 
    1138     if(pNewElem == NullFC) 
    1139         return; 
     1223    bool retVal = false; 
     1224 
     1225    if(pNewElem != NullFC) 
     1226        return retVal; 
    11401227 
    11411228    TypesFieldType::iterator fieldIt = 
     
    11441231    if(fieldIt != _mfTypes.end()) 
    11451232    { 
     1233        retVal = true; 
     1234     
    11461235        editMField(TypesFieldMask, _mfTypes); 
    11471236         
    11481237        (*fieldIt) = GeoUInt8PropertyPtr(pNewElem); 
    11491238    } 
     1239     
     1240    return retVal; 
    11501241} 
    11511242 
     
    11651256} 
    11661257 
    1167 void 
     1258bool 
    11681259VTKMapperBase::subTypes( 
    11691260    MFGeoUInt8PropertyInternalPtr::ArgumentType value) 
    11701261{ 
     1262    bool retVal = false; 
    11711263    TypesFieldType::iterator fieldIt = 
    11721264        _mfTypes.find(value); 
     
    11741266    if(fieldIt != _mfTypes.end()) 
    11751267    { 
     1268        retVal = true; 
     1269     
    11761270        editMField(TypesFieldMask, _mfTypes); 
    11771271         
    11781272        _mfTypes.erase(fieldIt); 
    11791273    } 
     1274     
     1275    return retVal; 
    11801276} 
    11811277 
     
    12431339} 
    12441340 
    1245 void 
     1341bool 
    12461342VTKMapperBase::replaceColors( 
    12471343    MFGeoColor4fPropertyInternalPtr::ArgumentType pOldElem, 
    12481344    MFGeoColor4fPropertyInternalPtr::ArgumentType pNewElem ) 
    12491345{ 
    1250     if(pNewElem == NullFC) 
    1251         return; 
     1346    bool retVal = false; 
     1347 
     1348    if(pNewElem != NullFC) 
     1349        return retVal; 
    12521350 
    12531351    ColorsFieldType::iterator fieldIt = 
     
    12561354    if(fieldIt != _mfColors.end()) 
    12571355    { 
     1356        retVal = true; 
     1357     
    12581358        editMField(ColorsFieldMask, _mfColors); 
    12591359         
    12601360        (*fieldIt) = GeoColor4fPropertyPtr(pNewElem); 
    12611361    } 
     1362     
     1363    return retVal; 
    12621364} 
    12631365 
     
    12771379} 
    12781380 
    1279 void 
     1381bool 
    12801382VTKMapperBase::subColors( 
    12811383    MFGeoColor4fPropertyInternalPtr::ArgumentType value) 
    12821384{ 
     1385    bool retVal = false; 
    12831386    ColorsFieldType::iterator fieldIt = 
    12841387        _mfColors.find(value); 
     
    12861389    if(fieldIt != _mfColors.end()) 
    12871390    { 
     1391        retVal = true; 
     1392     
    12881393        editMField(ColorsFieldMask, _mfColors); 
    12891394         
    12901395        _mfColors.erase(fieldIt); 
    12911396    } 
     1397     
     1398    return retVal; 
    12921399} 
    12931400 
     
    13551462} 
    13561463 
    1357 void 
     1464bool 
    13581465VTKMapperBase::replaceNormals( 
    13591466    MFGeoVec3fPropertyInternalPtr::ArgumentType pOldElem, 
    13601467    MFGeoVec3fPropertyInternalPtr::ArgumentType pNewElem ) 
    13611468{ 
    1362     if(pNewElem == NullFC) 
    1363         return; 
     1469    bool retVal = false; 
     1470 
     1471    if(pNewElem != NullFC) 
     1472        return retVal; 
    13641473 
    13651474    NormalsFieldType::iterator fieldIt = 
     
    13681477    if(fieldIt != _mfNormals.end()) 
    13691478    { 
     1479        retVal = true; 
     1480     
    13701481        editMField(NormalsFieldMask, _mfNormals); 
    13711482         
    13721483        (*fieldIt) = GeoVec3fPropertyPtr(pNewElem); 
    13731484    } 
     1485     
     1486    return retVal; 
    13741487} 
    13751488 
     
    13891502} 
    13901503 
    1391 void 
     1504bool 
    13921505VTKMapperBase::subNormals( 
    13931506    MFGeoVec3fPropertyInternalPtr::ArgumentType value) 
    13941507{ 
     1508    bool retVal = false; 
    13951509    NormalsFieldType::iterator fieldIt = 
    13961510        _mfNormals.find(value); 
     
    13981512    if(fieldIt != _mfNormals.end()) 
    13991513    { 
     1514        retVal = true; 
     1515     
    14001516        editMField(NormalsFieldMask, _mfNormals); 
    14011517         
    14021518        _mfNormals.erase(fieldIt); 
    14031519    } 
     1520     
     1521    return retVal; 
    14041522} 
    14051523 
     
    15601678 
    15611679//! create a new instance of the class 
    1562 VTKMapperPtr VTKMapperBase::create(void) 
    1563 
    1564     VTKMapperPtr fc; 
     1680VTKMapperBase::ObjRefPtr 
     1681VTKMapperBase::create(void) 
     1682
     1683    ObjRefPtr pFC; 
    15651684 
    15661685    if(getClassType().getPrototype() != NullFC) 
    15671686    { 
    1568         fc = dynamic_cast<VTKMapper::ObjPtr>( 
    1569             getClassType().getPrototype()-> shallowCopy()); 
    1570     } 
    1571  
    1572     return fc
     1687        pFC = boost::dynamic_pointer_cast<VTKMapper>( 
     1688            getClassType().getPrototype()->shallowCopy()); 
     1689    } 
     1690 
     1691    return pFC
    15731692} 
    15741693 
     
    15831702} 
    15841703 
    1585 FieldContainerPtr VTKMapperBase::shallowCopy(void) const 
    1586 
    1587     VTKMapperPtr returnValue; 
     1704FieldContainerRefPtr 
     1705VTKMapperBase::shallowCopy(void) const 
     1706
     1707    ObjPtr returnValue; 
    15881708 
    15891709    newPtr(returnValue, dynamic_cast<const VTKMapper *>(this)); 
    15901710 
    1591     return returnValue
     1711    return FieldContainerRefPtr(returnValue)
    15921712} 
    15931713 
     
    16401760    { 
    16411761        this->setRoot(source->getRoot()); 
     1762         
    16421763        GeoRootsFieldType::const_iterator GeoRootsIt  = 
    16431764            source->_mfGeoRoots.begin(); 
     
    16511772            ++GeoRootsIt; 
    16521773        } 
     1774         
    16531775        GeometriesFieldType::const_iterator GeometriesIt  = 
    16541776            source->_mfGeometries.begin(); 
     
    16621784            ++GeometriesIt; 
    16631785        } 
     1786         
    16641787        MaterialsFieldType::const_iterator MaterialsIt  = 
    16651788            source->_mfMaterials.begin(); 
     
    16731796            ++MaterialsIt; 
    16741797        } 
     1798         
    16751799        MaterialChunksFieldType::const_iterator MaterialChunksIt  = 
    16761800            source->_mfMaterialChunks.begin(); 
     
    16841808            ++MaterialChunksIt; 
    16851809        } 
     1810         
    16861811        PositionsFieldType::const_iterator PositionsIt  = 
    16871812            source->_mfPositions.begin(); 
     
    16951820            ++PositionsIt; 
    16961821        } 
     1822         
    16971823        LengthFieldType::const_iterator LengthIt  = 
    16981824            source->_mfLength.begin(); 
     
    17061832            ++LengthIt; 
    17071833        } 
     1834         
    17081835        TypesFieldType::const_iterator TypesIt  = 
    17091836            source->_mfTypes.begin(); 
     
    17171844            ++TypesIt; 
    17181845        } 
     1846         
    17191847        ColorsFieldType::const_iterator ColorsIt  = 
    17201848            source->_mfColors.begin(); 
     
    17281856            ++ColorsIt; 
    17291857        } 
     1858         
    17301859        NormalsFieldType::const_iterator NormalsIt  = 
    17311860            source->_mfNormals.begin(); 
     
    17391868            ++NormalsIt; 
    17401869        } 
     1870         
    17411871    } 
    17421872} 
     
    17591889             this->getType().getFieldDesc(RootFieldId))); 
    17601890 
    1761 //    returnValue->setSetMethod(boost::bind(&VTKMapper::setRoot,  
    1762 //                                          static_cast<VTKMapper *>(this), _1)); 
     1891    returnValue->setSetFunc( 
     1892        boost::bind( 
     1893            &VTKMapper::setRoot, 
     1894            static_cast<VTKMapper *>(this), _1)); 
    17631895 
    17641896    editSField(RootFieldMask); 
     
    17831915             &_mfGeoRoots,  
    17841916             this->getType().getFieldDesc(GeoRootsFieldId))); 
    1785  
    1786 //    returnValue->setAddMethod(boost::bind(&VTKMapper::addGeoRoots,  
    1787 //                              static_cast<VTKMapper *>(this), _1)); 
     1917    returnValue->setAddFunc( 
     1918        boost::bind( 
     1919            &VTKMapper::addGeoRoots, 
     1920            static_cast<VTKMapper *>(this), _1)); 
     1921    returnValue->setInsertFunc( 
     1922        boost::bind( 
     1923            &VTKMapper::insertGeoRoots, 
     1924            static_cast<VTKMapper *>(this), _1, _2)); 
     1925             
     1926    void (VTKMapper::*replaceGeoRootsIndexFunc)( 
     1927        UInt32 const, 
     1928        MFNodeInternalPtr::ArgumentType) = 
     1929            &VTKMapper::replaceGeoRoots; 
     1930    returnValue->setReplaceIndexFunc( 
     1931        boost::bind( 
     1932            replaceGeoRootsIndexFunc, 
     1933            static_cast<VTKMapper *>(this), _1, _2)); 
     1934             
     1935    bool (VTKMapper::*replaceGeoRootsObjectFunc)( 
     1936        MFNodeInternalPtr::ArgumentType, 
     1937        MFNodeInternalPtr::ArgumentType ) = 
     1938            &VTKMapper::replaceGeoRoots; 
     1939    returnValue->setReplaceObjectFunc( 
     1940        boost::bind( 
     1941            replaceGeoRootsObjectFunc, 
     1942            static_cast<VTKMapper *>(this), _1, _2)); 
     1943             
     1944    void (VTKMapper::*subGeoRootsIndexFunc)(UInt32 const) = 
     1945        &VTKMapper::subGeoRoots; 
     1946    returnValue->setSubIndexFunc( 
     1947        boost::bind( 
     1948            subGeoRootsIndexFunc, 
     1949            static_cast<VTKMapper *>(this), _1)); 
     1950             
     1951    bool (VTKMapper::*subGeoRootsObjectFunc)( 
     1952        MFNodeInternalPtr::ArgumentType) = 
     1953            &VTKMapper::subGeoRoots; 
     1954    returnValue->setSubObjectFunc( 
     1955        boost::bind( 
     1956            subGeoRootsObjectFunc, 
     1957            static_cast<VTKMapper *>(this), _1)); 
     1958    returnValue->setClearFunc( 
     1959        boost::bind( 
     1960            &VTKMapper::clearGeoRoots, 
     1961            static_cast<VTKMapper *>(this))); 
    17881962 
    17891963    editMField(GeoRootsFieldMask, _mfGeoRoots); 
     
    18081982             &_mfGeometries,  
    18091983             this->getType().getFieldDesc(GeometriesFieldId))); 
    1810  
    1811 //    returnValue->setAddMethod(boost::bind(&VTKMapper::addGeometries,  
    1812 //                              static_cast<VTKMapper *>(this), _1)); 
     1984    returnValue->setAddFunc( 
     1985        boost::bind( 
     1986            &VTKMapper::addGeometries, 
     1987            static_cast<VTKMapper *>(this), _1)); 
     1988    returnValue->setInsertFunc( 
     1989        boost::bind( 
     1990            &VTKMapper::insertGeometries, 
     1991            static_cast<VTKMapper *>(this), _1, _2)); 
     1992             
     1993    void (VTKMapper::*replaceGeometriesIndexFunc)( 
     1994        UInt32 const, 
     1995        MFGeometryInternalPtr::ArgumentType) = 
     1996            &VTKMapper::replaceGeometries; 
     1997    returnValue->setReplaceIndexFunc( 
     1998        boost::bind( 
     1999            replaceGeometriesIndexFunc, 
     2000            static_cast<VTKMapper *>(this), _1, _2)); 
     2001             
     2002    bool (VTKMapper::*replaceGeometriesObjectFunc)( 
     2003        MFGeometryInternalPtr::ArgumentType, 
     2004        MFGeometryInternalPtr::ArgumentType ) = 
     2005            &VTKMapper::replaceGeometries; 
     2006    returnValue->setReplaceObjectFunc( 
     2007        boost::bind( 
     2008            replaceGeometriesObjectFunc, 
     2009            static_cast<VTKMapper *>(this), _1, _2)); 
     2010             
     2011    void (VTKMapper::*subGeometriesIndexFunc)(UInt32 const) = 
     2012        &VTKMapper::subGeometries; 
     2013    returnValue->setSubIndexFunc( 
     2014        boost::bind( 
     2015            subGeometriesIndexFunc, 
     2016            static_cast<VTKMapper *>(this), _1)); 
     2017             
     2018    bool (VTKMapper::*subGeometriesObjectFunc)( 
     2019        MFGeometryInternalPtr::ArgumentType) = 
     2020            &VTKMapper::subGeometries; 
     2021    returnValue->setSubObjectFunc( 
     2022        boost::bind( 
     2023            subGeometriesObjectFunc, 
     2024            static_cast<VTKMapper *>(this), _1)); 
     2025    returnValue->setClearFunc( 
     2026        boost::bind( 
     2027            &VTKMapper::clearGeometries, 
     2028            static_cast<VTKMapper *>(this))); 
    18132029 
    18142030    editMField(GeometriesFieldMask, _mfGeometries); 
     
    18332049             &_mfMaterials,  
    18342050             this->getType().getFieldDesc(MaterialsFieldId))); 
    1835  
    1836 //    returnValue->setAddMethod(boost::bind(&VTKMapper::addMaterials,  
    1837 //                              static_cast<VTKMapper *>(this), _1)); 
     2051    returnValue->setAddFunc( 
     2052        boost::bind( 
     2053            &VTKMapper::addMaterials, 
     2054            static_cast<VTKMapper *>(this), _1)); 
     2055    returnValue->setInsertFunc( 
     2056        boost::bind( 
     2057            &VTKMapper::insertMaterials, 
     2058            static_cast<VTKMapper *>(this), _1, _2)); 
     2059             
     2060    void (VTKMapper::*replaceMaterialsIndexFunc)( 
     2061        UInt32 const, 
     2062        MFChunkMaterialInternalPtr::ArgumentType) = 
     2063            &VTKMapper::replaceMaterials; 
     2064    returnValue->setReplaceIndexFunc( 
     2065        boost::bind( 
     2066            replaceMaterialsIndexFunc, 
     2067            static_cast<VTKMapper *>(this), _1, _2)); 
     2068             
     2069    bool (VTKMapper::*replaceMaterialsObjectFunc)( 
     2070        MFChunkMaterialInternalPtr::ArgumentType, 
     2071        MFChunkMaterialInternalPtr::ArgumentType ) = 
     2072            &VTKMapper::replaceMaterials; 
     2073    returnValue->setReplaceObjectFunc( 
     2074        boost::bind( 
     2075            replaceMaterialsObjectFunc, 
     2076            static_cast<VTKMapper *>(this), _1, _2)); 
     2077             
     2078    void (VTKMapper::*subMaterialsIndexFunc)(UInt32 const) = 
     2079        &VTKMapper::subMaterials; 
     2080    returnValue->setSubIndexFunc( 
     2081        boost::bind( 
     2082            subMaterialsIndexFunc, 
     2083            static_cast<VTKMapper *>(this), _1)); 
     2084             
     2085    bool (VTKMapper::*subMaterialsObjectFunc)( 
     2086        MFChunkMaterialInternalPtr::ArgumentType) = 
     2087            &VTKMapper::subMaterials; 
     2088    returnValue->setSubObjectFunc( 
     2089        boost::bind( 
     2090            subMaterialsObjectFunc, 
     2091            static_cast<VTKMapper *>(this), _1)); 
     2092    returnValue->setClearFunc( 
     2093        boost::bind( 
     2094            &VTKMapper::clearMaterials, 
     2095            static_cast<VTKMapper *>(this))); 
    18382096 
    18392097    editMField(MaterialsFieldMask, _mfMaterials); 
     
    18582116             &_mfMaterialChunks,  
    18592117             this->getType().getFieldDesc(MaterialChunksFieldId))); 
    1860  
    1861 //    returnValue->setAddMethod(boost::bind(&VTKMapper::addMaterialChunks,  
    1862 //                              static_cast<VTKMapper *>(this), _1)); 
     2118    returnValue->setAddFunc( 
     2119        boost::bind( 
     2120            &VTKMapper::addMaterialChunks, 
     2121            static_cast<VTKMapper *>(this), _1)); 
     2122    returnValue->setInsertFunc( 
     2123        boost::bind( 
     2124            &VTKMapper::insertMaterialChunks, 
     2125            static_cast<VTKMapper *>(this), _1, _2)); 
     2126             
     2127    void (VTKMapper::*replaceMaterialChunksIndexFunc)( 
     2128        UInt32 const, 
     2129        MFMaterialChunkInternalPtr::ArgumentType) = 
     2130            &VTKMapper::replaceMaterialChunks; 
     2131    returnValue->setReplaceIndexFunc( 
     2132        boost::bind( 
     2133            replaceMaterialChunksIndexFunc, 
     2134            static_cast<VTKMapper *>(this), _1, _2)); 
     2135             
     2136    bool (VTKMapper::*replaceMaterialChunksObjectFunc)( 
     2137        MFMaterialChunkInternalPtr::ArgumentType, 
     2138        MFMaterialChunkInternalPtr::ArgumentType ) = 
     2139            &VTKMapper::replaceMaterialChunks; 
     2140    returnValue->setReplaceObjectFunc( 
     2141        boost::bind( 
     2142            replaceMaterialChunksObjectFunc, 
     2143            static_cast<VTKMapper *>(this), _1, _2)); 
     2144             
     2145    void (VTKMapper::*subMaterialChunksIndexFunc)(UInt32 const) = 
     2146        &VTKMapper::subMaterialChunks; 
     2147    returnValue->setSubIndexFunc( 
     2148        boost::bind( 
     2149            subMaterialChunksIndexFunc, 
     2150            static_cast<VTKMapper *>(this), _1)); 
     2151             
     2152    bool (VTKMapper::*subMaterialChunksObjectFunc)( 
     2153        MFMaterialChunkInternalPtr::ArgumentType) = 
     2154            &VTKMapper::subMaterialChunks; 
     2155    returnValue->setSubObjectFunc( 
     2156        boost::bind( 
     2157            subMaterialChunksObjectFunc, 
     2158            static_cast<VTKMapper *>(this), _1)); 
     2159    returnValue->setClearFunc( 
     2160        boost::bind( 
     2161            &VTKMapper::clearMaterialChunks, 
     2162            static_cast<VTKMapper *>(this))); 
    18632163 
    18642164    editMField(MaterialChunksFieldMask, _mfMaterialChunks); 
     
    18832183             &_mfPositions,  
    18842184             this->getType().getFieldDesc(PositionsFieldId))); 
    1885  
    1886 //    returnValue->setAddMethod(boost::bind(&VTKMapper::addPositions,  
    1887 //                              static_cast<VTKMapper *>(this), _1)); 
     2185    returnValue->setAddFunc( 
     2186        boost::bind( 
     2187            &VTKMapper::addPositions, 
     2188            static_cast<VTKMapper *>(this), _1)); 
     2189    returnValue->setInsertFunc( 
     2190        boost::bind( 
     2191            &VTKMapper::insertPositions, 
     2192            static_cast<VTKMapper *>(this), _1, _2)); 
     2193             
     2194    void (VTKMapper::*replacePositionsIndexFunc)( 
     2195        UInt32 const, 
     2196        MFGeoPnt3fPropertyInternalPtr::ArgumentType) = 
     2197            &VTKMapper::replacePositions; 
     2198    returnValue->setReplaceIndexFunc( 
     2199        boost::bind( 
     2200            replacePositionsIndexFunc, 
     2201            static_cast<VTKMapper *>(this), _1, _2)); 
     2202