本文整理汇总了C++中Visitor::VisitPointer方法的典型用法代码示例。如果您正苦于以下问题:C++ Visitor::VisitPointer方法的具体用法?C++ Visitor::VisitPointer怎么用?C++ Visitor::VisitPointer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Visitor
的用法示例。
在下文中一共展示了Visitor::VisitPointer方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
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 );
}
}
示例2: Host
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 );
}
}
示例3: Accept
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 );
}
}
示例4:
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 );
}
}
示例5: Accept
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 );
}
}