clang 19.0.0git
Public Member Functions | Friends | List of all members
clang::LazyVector< T, Source, Loader, LoadedStorage, LocalStorage >::iterator Class Reference

Iteration over the elements in the vector. More...

#include "clang/AST/ExternalASTSource.h"

Inheritance diagram for clang::LazyVector< T, Source, Loader, LoadedStorage, LocalStorage >::iterator:
Inheritance graph
[legend]

Public Member Functions

 iterator ()
 
iterator::reference operator* () const
 

Friends

class LazyVector
 

Detailed Description

template<typename T, typename Source, void(Source::*)(SmallVectorImpl< T > &) Loader, unsigned LoadedStorage = 2, unsigned LocalStorage = 4>
class clang::LazyVector< T, Source, Loader, LoadedStorage, LocalStorage >::iterator

Iteration over the elements in the vector.

In a complete iteration, the iterator walks the range [-M, N), where negative values are used to indicate elements loaded from the external source while non-negative values are used to indicate elements added via push_back(). However, to provide iteration in source order (for, e.g., chained precompiled headers), dereferencing the iterator flips the negative values (corresponding to loaded entities), so that position -M corresponds to element 0 in the loaded entities vector, position -M+1 corresponds to element 1 in the loaded entities vector, etc. This gives us a reasonably efficient, source-order walk.

We define this as a wrapping iterator around an int. The iterator_adaptor_base class forwards the iterator methods to basic integer arithmetic.

Definition at line 522 of file ExternalASTSource.h.

Constructor & Destructor Documentation

◆ iterator()

template<typename T , typename Source , void(Source::*)(SmallVectorImpl< T > &) Loader, unsigned LoadedStorage = 2, unsigned LocalStorage = 4>
clang::LazyVector< T, Source, Loader, LoadedStorage, LocalStorage >::iterator::iterator ( )
inline

Definition at line 535 of file ExternalASTSource.h.

Member Function Documentation

◆ operator*()

template<typename T , typename Source , void(Source::*)(SmallVectorImpl< T > &) Loader, unsigned LoadedStorage = 2, unsigned LocalStorage = 4>
iterator::reference clang::LazyVector< T, Source, Loader, LoadedStorage, LocalStorage >::iterator::operator* ( ) const
inline

Definition at line 537 of file ExternalASTSource.h.

Friends And Related Function Documentation

◆ LazyVector

template<typename T , typename Source , void(Source::*)(SmallVectorImpl< T > &) Loader, unsigned LoadedStorage = 2, unsigned LocalStorage = 4>
friend class LazyVector
friend

Definition at line 525 of file ExternalASTSource.h.


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