class DeclContext::filtered_decl_iterator
Declaration
template <typename SpecificDecl,
bool (SpecificDecl::*)() const Acceptable>
class DeclContext::filtered_decl_iterator { /* full declaration omitted */ };
Description
Iterates over a filtered subrange of declarations stored in a DeclContext. This iterator visits only those declarations that are of type SpecificDecl (or a class derived from it) and that meet some additional run-time criteria. This iterator is used, for example, to provide access to the instance methods within an Objective-C interface (with SpecificDecl = ObjCMethodDecl and Acceptable = ObjCMethodDecl::isInstanceMethod).
Declared at: clang/include/clang/AST/DeclBase.h:2255
Templates
- SpecificDecl
- bool (SpecificDecl::*)() const Acceptable
Member Variables
- private DeclContext::decl_iterator Current
- Current - The current, underlying declaration iterator, which will either be NULL or will point to a declaration of type SpecificDecl.
Method Overview
- private void SkipToNextDecl()
- public filtered_decl_iterator<SpecificDecl, Acceptable>()
- public filtered_decl_iterator<SpecificDecl, Acceptable>(DeclContext::decl_iterator C)
Methods
¶void SkipToNextDecl()
void SkipToNextDecl()
Description
SkipToNextDecl - Advances the current position up to the next declaration of type SpecificDecl that also meets the criteria required by Acceptable.
Declared at: clang/include/clang/AST/DeclBase.h:2264
¶filtered_decl_iterator<SpecificDecl, Acceptable>()
filtered_decl_iterator<SpecificDecl, Acceptable>()
Declared at: clang/include/clang/AST/DeclBase.h:2281
¶filtered_decl_iterator<SpecificDecl, Acceptable>(
DeclContext::decl_iterator C)
filtered_decl_iterator<SpecificDecl, Acceptable>(
DeclContext::decl_iterator C)
Description
filtered_decl_iterator - Construct a new iterator over a subset of the declarations the range [C, end-of-declarations). If A is non-NULL, it is a pointer to a member function of SpecificDecl that should return true for all of the SpecificDecl instances that will be in the subset of iterators. For example, if you want Objective-C instance methods, SpecificDecl will be ObjCMethodDecl and A will be &ObjCMethodDecl ::isInstanceMethod.
Declared at: clang/include/clang/AST/DeclBase.h:2291