clang 10.0.0git

Public Types | Public Member Functions | Friends | List of all members
clang::DeclContext::filtered_decl_iterator< SpecificDecl, Acceptable > Class Template Reference

Iterates over a filtered subrange of declarations stored in a DeclContext. More...

`#include "clang/AST/DeclBase.h"`

## Public Types
using | value_type = SpecificDecl *
using | reference = void
using | pointer = void
using | difference_type = std::iterator_traits< DeclContext::decl_iterator >::difference_type
using | iterator_category = std::forward_iterator_tag

## Public Member Functions
| filtered_decl_iterator ()=default
| filtered_decl_iterator (DeclContext::decl_iterator C)
| filtered_decl_iterator - Construct a new iterator over a subset of the declarations the range [C, end-of-declarations). More...
value_type | operator* () const
value_type | operator-> () const
filtered_decl_iterator & | operator++ ()
filtered_decl_iterator | operator++ (int)

## Friends
bool | operator== (const filtered_decl_iterator &x, const filtered_decl_iterator &y)
bool | operator!= (const filtered_decl_iterator &x, const filtered_decl_iterator &y)

## Detailed Description

### template<typename SpecificDecl, bool(SpecificDecl::*)() const Acceptable>
class clang::DeclContext::filtered_decl_iterator< SpecificDecl, Acceptable >

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).

Definition at line 2129 of file DeclBase.h.

## Member Typedef Documentation

## ◆ difference_type

template<typename SpecificDecl , bool(SpecificDecl::*)() const Acceptable>

using clang::DeclContext::filtered_decl_iterator< SpecificDecl, Acceptable >::difference_type = std::iterator_traits<DeclContext::decl_iterator>::difference_type

Definition at line 2152 of file DeclBase.h.

## ◆ iterator_category

template<typename SpecificDecl , bool(SpecificDecl::*)() const Acceptable>

using clang::DeclContext::filtered_decl_iterator< SpecificDecl, Acceptable >::iterator_category = std::forward_iterator_tag

Definition at line 2153 of file DeclBase.h.

## ◆ pointer

template<typename SpecificDecl , bool(SpecificDecl::*)() const Acceptable>

using clang::DeclContext::filtered_decl_iterator< SpecificDecl, Acceptable >::pointer = void

Definition at line 2150 of file DeclBase.h.

## ◆ reference

template<typename SpecificDecl , bool(SpecificDecl::*)() const Acceptable>

using clang::DeclContext::filtered_decl_iterator< SpecificDecl, Acceptable >::reference = void

Definition at line 2149 of file DeclBase.h.

## ◆ value_type

template<typename SpecificDecl , bool(SpecificDecl::*)() const Acceptable>

using clang::DeclContext::filtered_decl_iterator< SpecificDecl, Acceptable >::value_type = SpecificDecl *

Definition at line 2146 of file DeclBase.h.

## Constructor & Destructor Documentation

## ◆ filtered_decl_iterator() [1/2]

template<typename SpecificDecl , bool(SpecificDecl::*)() const Acceptable>

clang::DeclContext::filtered_decl_iterator< SpecificDecl, Acceptable >::filtered_decl_iterator | ( |  | ) |
| default

## ◆ filtered_decl_iterator() [2/2]

template<typename SpecificDecl , bool(SpecificDecl::*)() const Acceptable>

clang::DeclContext::filtered_decl_iterator< SpecificDecl, Acceptable >::filtered_decl_iterator | ( | DeclContext::decl_iterator | C | ) |
| inline explicit

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.

Definition at line 2165 of file DeclBase.h.

## Member Function Documentation

## ◆ operator*()

template<typename SpecificDecl , bool(SpecificDecl::*)() const Acceptable>

value_type clang::DeclContext::filtered_decl_iterator< SpecificDecl, Acceptable >::operator* | ( |  | ) | const
| inline

Definition at line 2169 of file DeclBase.h.

## ◆ operator++() [1/2]

template<typename SpecificDecl , bool(SpecificDecl::*)() const Acceptable>

filtered_decl_iterator& clang::DeclContext::filtered_decl_iterator< SpecificDecl, Acceptable >::operator++ | ( |  | ) |
| inline

Definition at line 2172 of file DeclBase.h.

## ◆ operator++() [2/2]

template<typename SpecificDecl , bool(SpecificDecl::*)() const Acceptable>

filtered_decl_iterator clang::DeclContext::filtered_decl_iterator< SpecificDecl, Acceptable >::operator++ | ( | int |  | ) |
| inline

Definition at line 2178 of file DeclBase.h.

## ◆ operator->()

template<typename SpecificDecl , bool(SpecificDecl::*)() const Acceptable>

value_type clang::DeclContext::filtered_decl_iterator< SpecificDecl, Acceptable >::operator-> | ( |  | ) | const
| inline

Definition at line 2170 of file DeclBase.h.

## Friends And Related Function Documentation

## ◆ operator!=

template<typename SpecificDecl , bool(SpecificDecl::*)() const Acceptable>

bool operator!= | ( | const filtered_decl_iterator< SpecificDecl, Acceptable > & | x,
|  | const filtered_decl_iterator< SpecificDecl, Acceptable > & | y
| ) |  |
| friend

Definition at line 2189 of file DeclBase.h.

## ◆ operator==

template<typename SpecificDecl , bool(SpecificDecl::*)() const Acceptable>

bool operator== | ( | const filtered_decl_iterator< SpecificDecl, Acceptable > & | x,
|  | const filtered_decl_iterator< SpecificDecl, Acceptable > & | y
| ) |  |
| friend

Definition at line 2184 of file DeclBase.h.

The documentation for this class was generated from the following file:

- include/clang/AST/DeclBase.h