void SimpleElementMapSerializer<KeyT>::Accept(Visitor& visitor) { DataType::iterator itr = const_cast<Serializer::DataPtr<DataType>&>(m_Data)->begin(); DataType::iterator end = const_cast<Serializer::DataPtr<DataType>&>(m_Data)->end(); for ( ; itr != end; ++itr ) { if (!itr->second.ReferencesObject()) { continue; } if (!visitor.VisitPointer(itr->second)) { continue; } itr->second->Accept( visitor ); } }
void ElementArraySerializer::Host(Visitor& visitor) { V_Element::iterator itr = const_cast<Serializer::DataPtr<DataType>&>(m_Data)->begin(); V_Element::iterator end = const_cast<Serializer::DataPtr<DataType>&>(m_Data)->end(); for ( ; itr != end; ++itr ) { if (!itr->ReferencesObject()) { continue; } if (!visitor.VisitPointer(*itr)) { continue; } (*itr)->Host( visitor ); } }
void ObjectDynArrayData::Accept( Visitor& visitor ) { DynArray< ObjectPtr >::Iterator itr = m_Data->Begin(); DynArray< ObjectPtr >::Iterator end = m_Data->End(); for ( ; itr != end; ++itr ) { ObjectPtr& object = *itr; if( !object.ReferencesObject() ) { continue; } if( !visitor.VisitPointer( object ) ) { continue; } object->Accept( visitor ); } }
void SimpleObjectSortedMapData< KeyT, CompareKeyT, AllocatorT >::Accept( Visitor& visitor ) { DataType::Iterator itr = const_cast< DataPointer< DataType >& >( m_Data )->Begin(); DataType::Iterator end = const_cast< DataPointer< DataType >& >( m_Data )->End(); for ( ; itr != end; ++itr ) { ObjectPtr& object = itr->Second(); if ( !object.Get() ) { continue; } if ( !visitor.VisitPointer( object ) ) { continue; } object->Accept( visitor ); } }
void ObjectStlSetData::Accept(Visitor& visitor) { DataType::iterator itr = const_cast<DataPointer<DataType>&>(m_Data)->begin(); DataType::iterator end = const_cast<DataPointer<DataType>&>(m_Data)->end(); for ( ; itr != end; ++itr ) { if (!itr->ReferencesObject()) { continue; } // just a note, this code is problematic with STLPort, but i wasn't // able to figure out how to fix it ... works fine with msvc native iterators // i wish i had saved the compile error; geoff suspects it is const-ness related // if (!visitor.VisitPointer(*itr)) { continue; } (*itr)->Accept( visitor ); } }