Show
Ignore:
Timestamp:
04/04/08 00:28:08 (6 months ago)
Author:
vossg
Message:

added: cluster and mt local fieldcontainer infrastructure

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Source/Contrib/Manipulators/OSGMoveManipulatorBase.cpp

    r1096 r1098  
    8484    "NULL", 
    8585    0, 
    86     (PrototypeCreateF) &MoveManipulatorBase::createEmpty
     86    (PrototypeCreateF) &MoveManipulatorBase::createEmptyLocal
    8787    MoveManipulator::initMethod, 
    8888    MoveManipulator::exitMethod, 
     
    172172} 
    173173 
     174//! create a new instance of the class 
     175MoveManipulatorTransitPtr MoveManipulatorBase::createLocal(BitVector bFlags) 
     176{ 
     177    MoveManipulatorTransitPtr fc; 
     178 
     179    if(getClassType().getPrototype() != NullFC) 
     180    { 
     181        FieldContainerTransitPtr tmpPtr = 
     182            getClassType().getPrototype()-> shallowCopyLocal(bFlags); 
     183 
     184        fc = dynamic_pointer_cast<MoveManipulator>(tmpPtr); 
     185    } 
     186 
     187    return fc; 
     188} 
     189 
    174190//! create an empty new instance of the class, do not copy the prototype 
    175191MoveManipulatorPtr MoveManipulatorBase::createEmpty(void) 
     
    177193    MoveManipulatorPtr returnValue; 
    178194 
    179     newPtr<MoveManipulator>(returnValue); 
     195    newPtr<MoveManipulator>(returnValue, Thread::getCurrentLocalFlags()); 
     196 
     197    returnValue->_pFieldFlags->_bNamespaceMask &=  
     198        ~Thread::getCurrentLocalFlags();  
     199 
     200    return returnValue; 
     201
     202 
     203MoveManipulatorPtr MoveManipulatorBase::createEmptyLocal(BitVector bFlags) 
     204
     205    MoveManipulatorPtr returnValue; 
     206 
     207    newPtr<MoveManipulator>(returnValue, bFlags); 
     208 
     209    returnValue->_pFieldFlags->_bNamespaceMask &= ~bFlags; 
    180210 
    181211    return returnValue; 
     
    186216    MoveManipulatorPtr tmpPtr; 
    187217 
    188     newPtr(tmpPtr, dynamic_cast<const MoveManipulator *>(this)); 
     218    newPtr(tmpPtr,  
     219           dynamic_cast<const MoveManipulator *>(this),  
     220           Thread::getCurrentLocalFlags()); 
     221 
     222    tmpPtr->_pFieldFlags->_bNamespaceMask &= ~Thread::getCurrentLocalFlags(); 
    189223 
    190224    FieldContainerTransitPtr returnValue(tmpPtr); 
     225 
     226    return returnValue; 
     227} 
     228 
     229FieldContainerTransitPtr MoveManipulatorBase::shallowCopyLocal( 
     230    BitVector bFlags) const 
     231{ 
     232    MoveManipulatorPtr tmpPtr; 
     233 
     234    newPtr(tmpPtr, dynamic_cast<const MoveManipulator *>(this), bFlags); 
     235 
     236    FieldContainerTransitPtr returnValue(tmpPtr); 
     237 
     238    tmpPtr->_pFieldFlags->_bNamespaceMask &= ~bFlags; 
    191239 
    192240    return returnValue;