clang  3.7.0
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 <DeclBase.h>

Public Types

typedef SpecificDecl * value_type
 
typedef void reference
 
typedef void pointer
 
typedef std::iterator_traits
< DeclContext::decl_iterator >
::difference_type 
difference_type
 
typedef std::forward_iterator_tag iterator_category
 

Public Member Functions

 filtered_decl_iterator ()
 
 filtered_decl_iterator (DeclContext::decl_iterator C)
 
value_type operator* () const
 
value_type operator-> () const
 
filtered_decl_iteratoroperator++ ()
 
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 1508 of file DeclBase.h.

Member Typedef Documentation

template<typename SpecificDecl , bool(SpecificDecl::*)() const Acceptable>
typedef std::iterator_traits<DeclContext::decl_iterator>::difference_type clang::DeclContext::filtered_decl_iterator< SpecificDecl, Acceptable >::difference_type

Definition at line 1531 of file DeclBase.h.

template<typename SpecificDecl , bool(SpecificDecl::*)() const Acceptable>
typedef std::forward_iterator_tag clang::DeclContext::filtered_decl_iterator< SpecificDecl, Acceptable >::iterator_category

Definition at line 1532 of file DeclBase.h.

template<typename SpecificDecl , bool(SpecificDecl::*)() const Acceptable>
typedef void clang::DeclContext::filtered_decl_iterator< SpecificDecl, Acceptable >::pointer

Definition at line 1529 of file DeclBase.h.

template<typename SpecificDecl , bool(SpecificDecl::*)() const Acceptable>
typedef void clang::DeclContext::filtered_decl_iterator< SpecificDecl, Acceptable >::reference

Definition at line 1528 of file DeclBase.h.

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

Definition at line 1525 of file DeclBase.h.

Constructor & Destructor Documentation

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

Definition at line 1534 of file DeclBase.h.

template<typename SpecificDecl , bool(SpecificDecl::*)() const Acceptable>
clang::DeclContext::filtered_decl_iterator< SpecificDecl, Acceptable >::filtered_decl_iterator ( DeclContext::decl_iterator  C)
inlineexplicit

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 1544 of file DeclBase.h.

Member Function Documentation

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

Definition at line 1548 of file DeclBase.h.

template<typename SpecificDecl , bool(SpecificDecl::*)() const Acceptable>
filtered_decl_iterator& clang::DeclContext::filtered_decl_iterator< SpecificDecl, Acceptable >::operator++ ( )
inline

Definition at line 1551 of file DeclBase.h.

template<typename SpecificDecl , bool(SpecificDecl::*)() const Acceptable>
filtered_decl_iterator clang::DeclContext::filtered_decl_iterator< SpecificDecl, Acceptable >::operator++ ( int  )
inline

Definition at line 1557 of file DeclBase.h.

template<typename SpecificDecl , bool(SpecificDecl::*)() const Acceptable>
value_type clang::DeclContext::filtered_decl_iterator< SpecificDecl, Acceptable >::operator-> ( ) const
inline

Definition at line 1549 of file DeclBase.h.

Friends And Related Function Documentation

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 1568 of file DeclBase.h.

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 1563 of file DeclBase.h.


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