Show
Ignore:
Timestamp:
12/12/07 18:00:42 (10 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/System/Cluster/Window/SortLast/OSGSepiaComposerBase.cpp

    r1020 r1032  
    7878 */ 
    7979 
     80     
     81void SepiaComposerBase::classDescInserter(TypeObject &oType) 
     82{ 
     83    FieldDescriptionBase *pDesc = NULL; 
     84 
     85} 
    8086 
    8187SepiaComposerBase::TypeObject SepiaComposerBase::_type( 
     
    105111    "" 
    106112    ); 
    107  
     113     
    108114/*------------------------------ get -----------------------------------*/ 
    109115 
     
    153159 
    154160//! create a new instance of the class 
    155 SepiaComposerPtr SepiaComposerBase::create(void) 
    156 
    157     SepiaComposerPtr fc; 
     161SepiaComposerBase::ObjRefPtr 
     162SepiaComposerBase::create(void) 
     163
     164    ObjRefPtr pFC; 
    158165 
    159166    if(getClassType().getPrototype() != NullFC) 
    160167    { 
    161         fc = dynamic_cast<SepiaComposer::ObjPtr>( 
    162             getClassType().getPrototype()-> shallowCopy()); 
     168        pFC = boost::dynamic_pointer_cast<SepiaComposer>( 
     169            getClassType().getPrototype()->shallowCopy()); 
    163170    } 
    164171 
    165     return fc
     172    return pFC
    166173} 
    167174 
     
    176183} 
    177184 
    178 FieldContainerPtr SepiaComposerBase::shallowCopy(void) const 
    179 
    180     SepiaComposerPtr returnValue; 
     185FieldContainerRefPtr 
     186SepiaComposerBase::shallowCopy(void) const 
     187
     188    ObjPtr returnValue; 
    181189 
    182190    newPtr(returnValue, dynamic_cast<const SepiaComposer *>(this)); 
    183191 
    184     return returnValue
     192    return FieldContainerRefPtr(returnValue)
    185193} 
    186194