Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Reference Count Functions
[Base]


Functions

template<class T>
void osg::setRefP (T *&pObject, T *&pNewObject)
template<class T>
void osg::addRefP (T *&pObject)
template<class T>
void osg::subRefP (T *&pObject)
template<class T>
void osg::clearRefP (T *&pObject)
template<class T>
void osg::clearRefPVector (std::vector< T * > &vVector)
template<class T>
void osg::clearRefPVectorP (std::vector< T * > *pVector)

Detailed Description

ToDo

Function Documentation

template<class T>
void osg::setRefP T *&  pObject,
T *&  pNewObject
[inline]
 

Definition at line 1650 of file OSGBaseFunctions.inl.

Referenced by osg::ThreadCommonBase::setChangeList().

01651 {
01652     if(pObject != NULL)
01653         pObject->subRef();
01654 
01655     pObject = pNewObject;
01656 
01657     if(pObject != NULL)
01658         pObject->addRef();
01659 }

template<class T>
void osg::addRefP T *&  pObject  )  [inline]
 

Definition at line 1665 of file OSGBaseFunctions.inl.

Referenced by osg::ClusterWindow::getNetwork(), osg::FieldContainerPtrBase::initialize(), osg::FieldContainerFactory::initialize(), osg::SimpleStatisticsForeground::initText(), and osg::GraphicStatisticsForeground::initText().

01666 {
01667     if(pObject != NULL)
01668         pObject->addRef();
01669 }

template<class T>
void osg::subRefP T *&  pObject  )  [inline]
 

Definition at line 1675 of file OSGBaseFunctions.inl.

Referenced by osg::TextFaceFactory::clearCache(), osg::ClusterViewBuffer::recv(), osg::ClusterViewBuffer::send(), osg::FieldContainerPtrBase::terminate(), osg::FieldContainerFactory::terminate(), osg::ClusterWindow::~ClusterWindow(), and osg::ThreadCommonBase::~ThreadCommonBase().

01676 {
01677     if(pObject != NULL)
01678         pObject->subRef();
01679 }

template<class T>
void osg::clearRefP T *&  pObject  )  [inline]
 

Definition at line 1685 of file OSGBaseFunctions.inl.

01686 {
01687     if(pObject != NULL)
01688         pObject->subRef();
01689 
01690     pObject = NULL;
01691 }

template<class T>
void osg::clearRefPVector std::vector< T * > &  vVector  )  [inline]
 

Definition at line 1697 of file OSGBaseFunctions.inl.

01698 {
01699     for(UInt32 i = 0; i < vVector.size(); i++)
01700         vVector[i]->subRef();
01701 
01702     vVector.erase(vVector.begin(), vVector.end());
01703 }

template<class T>
void osg::clearRefPVectorP std::vector< T * > *  pVector  )  [inline]
 

Definition at line 1709 of file OSGBaseFunctions.inl.

01710 {
01711     if(pVector != NULL)
01712     {
01713         for(UInt32 uiIndex = 0; uiIndex < pVector->size(); uiIndex++)
01714             (*pVector)[uiIndex]->subRef();
01715 
01716         pVector->erase(pVector->begin(), pVector->end());
01717     }
01718 }


Generated on Thu Aug 25 04:12:28 2005 for OpenSG by  doxygen 1.4.3