Ejemplo n.º 1
0
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 );
    }
}
Ejemplo n.º 2
0
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 );
    }
}
Ejemplo n.º 3
0
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 );
    }
}
Ejemplo n.º 4
0
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 );
    }
}
Ejemplo n.º 5
0
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 );
    }
}