本文整理汇总了C++中IVisitor类的典型用法代码示例。如果您正苦于以下问题:C++ IVisitor类的具体用法?C++ IVisitor怎么用?C++ IVisitor使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了IVisitor类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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:
void Scene::ForEach( IVisitor& _Visitor, Node* _pNode )
{
_Visitor.HandleNode( *_pNode );
for ( int ChildIndex=0; ChildIndex < _pNode->m_ChildrenCount; ChildIndex++ )
{
Node* pChild = _pNode->m_ppChildren[ChildIndex];
ForEach( _Visitor, pChild );
}
}
示例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 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);
}
}
示例7: Foreach
void CommandTaskResult::Foreach(IVisitor<CommandPointResult>& visitor) const
{
uint32_t headerIndex = 0;
for (auto& header : *m_vector)
{
auto visit = [&](const CommandState& state) {
visitor.OnValue(CommandPointResult(headerIndex, state.index, state.state, state.status));
};
header->ForeachItem(visit);
++headerIndex;
}
}
示例8: accept
void PngImage::accept(IVisitor<IImage>& visitor) {
visitor.visit(*this);
}
示例9: accept
void Ingredient::accept(IVisitor& visitor)
{
visitor.visit(this);
}
示例10: Accept
virtual void Accept(IVisitor& visitor) const { visitor.Visit(*this); }
示例11: Accept
void CScriptCameraHint::Accept(IVisitor& visitor) { visitor.Visit(this); }
示例12: Accept
void Accept(IVisitor& v) const { v.Visit(*this); }
示例13: accept
void AstConstantDecl::accept(IVisitor &v)
{
v.visit(*this);
}
示例14: visit
void Raw::visit(IVisitor& visitor)
{
visitor.visitRaw(*this);
}
示例15: Accept
void CRectangle::Accept(IVisitor & visitor)
{
visitor.Visit(*this);
}