clang API Documentation

Public Types | Public Member Functions | Friends
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>

List of all members.

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 1419 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 1442 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 1443 of file DeclBase.h.

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

Definition at line 1440 of file DeclBase.h.

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

Definition at line 1439 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 1436 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 1445 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) [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 1455 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 1459 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 1462 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 1468 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 1460 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 1479 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 1474 of file DeclBase.h.


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