本文整理汇总了C++中IVisitor::visit方法的典型用法代码示例。如果您正苦于以下问题:C++ IVisitor::visit方法的具体用法?C++ IVisitor::visit怎么用?C++ IVisitor::visit使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IVisitor
的用法示例。
在下文中一共展示了IVisitor::visit方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: traverseSprites
void SpritesPanelImpl::traverseSprites(const std::vector<d2d::ISprite*>& sprites,
IVisitor& visitor, TraverseType type/* = e_allExisting*/,
bool order/* = true*/)
{
if (order)
{
std::vector<ISprite*>::const_iterator itr = sprites.begin();
for ( ; itr != sprites.end(); ++itr)
{
bool hasNext;
visitor.visit(*itr, hasNext);
if (!hasNext) break;
}
}
else
{
std::vector<ISprite*>::const_reverse_iterator itr = sprites.rbegin();
for ( ; itr != sprites.rend(); ++itr)
{
bool hasNext;
visitor.visit(*itr, hasNext);
if (!hasNext) break;
}
}
}
示例2: visitorFunction
enum CXChildVisitResult visitorFunction(
CXCursor cursor,
CXCursor parent,
CXClientData clientData)
{
IVisitor* visitor = (IVisitor*)clientData;
return visitor->visit(cursor, parent);
}
示例3: traverseEditableLayers
void LayersMgrWidget::traverseEditableLayers(IVisitor& visitor)
{
if (m_editedLayer)
{
bool hasNext;
visitor.visit(m_editedLayer, hasNext);
}
}
示例4: accept
void CaseBase::accept(IVisitor& visitor)
{
visitor.visit(*this);
for (ActionStore::iterator I = mActions.begin(); I != mActions.end(); ++I) {
(*I)->accept(visitor);
}
for (MatchBaseStore::iterator I = mMatches.begin(); I != mMatches.end(); ++I) {
(*I)->accept(visitor);
}
}
示例5: traverseAllLayers
void LayersMgrWidget::traverseAllLayers(IVisitor& visitor)
{
std::vector<LayerWidget*>::const_iterator itr = m_layers.begin();
for ( ; itr != m_layers.end(); ++itr)
{
bool hasNext;
visitor.visit((*itr)->getLayer(), hasNext);
if (!hasNext) break;
}
}
示例6: accept
void AstVariable::accept(IVisitor &v)
{
v.visit(*this);
}
示例7:
void
AndElement::accept ( IVisitor& _visitor ) const
{
_visitor.visit( *this );
} // AndElement::accept
示例8: accept
void PngImage::accept(IVisitor<IImage>& visitor) {
visitor.visit(*this);
}
示例9: accept
void Action::accept(IVisitor& visitor)
{
visitor.visit(*this);
}
示例10: accept
void Ingredient::accept(IVisitor& visitor)
{
visitor.visit(this);
}
示例11: accept
void accept( IVisitor & visitor ) override
{
visitor.visit( * this );
}