// Is the given object in the container property.
AAFRESULT STDMETHODCALLTYPE ImplAAFRefContainerValue::ContainsElement(
  ImplAAFPropertyValue* pPropertyValue,
  aafBoolean_t* pResult)
{
  AAFRESULT result = AAFRESULT_SUCCESS;
  if (NULL == pPropertyValue || NULL == pResult)
    return AAFRESULT_NULL_PARAM;
  
  *pResult = kAAFFalse;  
    
  ImplAAFStorable * pObject = GetStorableFromPropertyValue(pPropertyValue, result);
  if (AAFRESULT_FAILED(result))
    return result;
  
  result = ContainsObject(pObject, pResult); 
  return result;
}
Beispiel #2
0
void CSpatialTree::InsertObject( CSpatialTreeObject * obj ) {

    if( ContainsObject( obj ) || !m_pParentNode ) {
    
        m_pQTObjects.insert( std::make_pair( obj->GetEntityID(), obj ) );
 
        if( m_pChildNodes ) {
        
            for( int i = 0; i < m_NumNodes; i++ ) {
             
                m_pChildNodes[i].InsertObject( obj );
                
            }
        
        }
        
    }
    
}