Show
Ignore:
Timestamp:
01/16/08 16:07:40 (1 year ago)
Author:
cneumann
Message:

changed: - factory functions return a TransitPtr? that can not be implicitly

converted to C Ptr. Should help with porting.

added: - GlobalRefPtr?, needed for cases where upon return from main

a RefPtr? goes out of scope (it would attempt to access the
FCFactory which is already shutdown at that point).

status: - vrml loader does not compile (needs porting to ref ptr)

  • tutorials compile, run and exit cleanly
  • multithreading and cluster are untested, yet
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/Carsten_PtrWork2/Source/System/Image/WS/OSGImage.cpp

    r1018 r1039  
    681681                           ImagePtr           destination) 
    682682{ 
    683           UChar8   *data       = NULL; 
    684     const UChar8   *sourceData = NULL; 
    685           UInt32    srcI, destI, destSize = 0; 
    686           UInt32    sum; 
    687           Real64    sumReal; 
    688           ImagePtr  dest = destination
     683          UChar8      *data       = NULL; 
     684    const UChar8      *sourceData = NULL; 
     685          UInt32       srcI, destI, destSize = 0; 
     686          UInt32       sum; 
     687          Real64       sumReal; 
     688          ImageRefPtr  dest(destination)
    689689 
    690690    if (hasCompressedData()) 
     
    697697    { 
    698698        dest = Image::create(); 
    699         addRef(dest); 
    700699    } 
    701700 
     
    20232022            { 
    20242023                this->set(dest); 
    2025                 subRef(dest); 
    20262024            } 
    20272025        } 
     
    21202118           getDataType(), destDataType)); 
    21212119 
    2122     ImagePtr dest; 
    2123  
    2124     dest = Image::create(); 
    2125  
    2126     addRef(dest); 
     2120    ImageRefPtr dest(Image::create()); 
    21272121 
    21282122    dest->set(getPixelFormat(), 
     
    24192413    { 
    24202414        this->set(dest); 
    2421  
    2422         subRef(dest); 
    24232415    } 
    24242416 
     
    25132505    if(att == NullFC) 
    25142506    { 
    2515         att = ImageGenericAtt::create(); 
    2516  
    2517         addAttachment(att); 
     2507        ImageGenericAttRefPtr newAtt = ImageGenericAtt::create(); 
     2508        att = newAtt; 
     2509 
     2510        addAttachment(newAtt); 
    25182511    } 
    25192512 
     
    27122705                     ImagePtr destination) 
    27132706{ 
    2714     ImagePtr destImage = destination
    2715     bool     retCode   = true; 
     2707    ImageRefPtr destImage(destination)
     2708    bool        retCode   = true; 
    27162709 
    27172710    if (hasCompressedData()) 
     
    27242717    { 
    27252718        destImage = Image::create(); 
    2726  
    2727         addRef(destImage); 
    27282719    } 
    27292720 
     
    27832774    { 
    27842775        this->set(destImage); 
    2785  
    2786         subRef(destImage); 
    27872776    } 
    27882777 
     
    28002789                  ImagePtr destination) 
    28012790{ 
    2802     ImagePtr destImage = destination
    2803     bool     retCode   = true; 
    2804     UInt32   counter   = 0; 
     2791    ImageRefPtr destImage(destination)
     2792    bool        retCode   = true; 
     2793    UInt32      counter   = 0; 
    28052794 
    28062795    if (hasCompressedData()) 
     
    28132802    { 
    28142803        destImage = Image::create(); 
    2815  
    2816         addRef(destImage); 
    28172804    } 
    28182805 
     
    29172904    { 
    29182905        this->set(destImage); 
    2919  
    2920         subRef(destImage); 
    29212906    } 
    29222907 
     
    29742959    }; 
    29752960 
    2976     Int32   offsetSize[] = { 0, 2, 2, 4, 2, 4, 4, 8 }; 
    2977  
    2978     ImagePtr destImage = destination; 
     2961    Int32       offsetSize[] = { 0, 2, 2, 4, 2, 4, 4, 8 }; 
     2962    ImageRefPtr destImage(destination); 
    29792963 
    29802964    Int32   w = getWidth(), h = getHeight(), d = getDepth(); 
     
    30012985    { 
    30022986        destImage = Image::create(); 
    3003  
    3004         addRef(destImage); 
    30052987    } 
    30062988 
     
    33943376    { 
    33953377        this->set(destImage); 
    3396  
    3397         subRef(destImage); 
    33983378    } 
    33993379