class LazyVector::iterator
Declaration
class LazyVector::iterator { /* full declaration omitted */ };
Description
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 \c 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.
Declared at: clang/include/clang/AST/ExternalASTSource.h:514
Member Variables
- private LazyVector<T, Source, Loader, LoadedStorage, LocalStorage>* Self
Method Overview
- private bool isLoaded() const
- private iterator(LazyVector<T, Source, Loader, LoadedStorage, LocalStorage> * Self, int Position)
- public iterator()
Methods
¶bool isLoaded() const
bool isLoaded() const
Declared at: clang/include/clang/AST/ExternalASTSource.h:524
¶iterator(LazyVector<T,
Source,
Loader,
LoadedStorage,
LocalStorage>* Self,
int Position)
iterator(LazyVector<T,
Source,
Loader,
LoadedStorage,
LocalStorage>* Self,
int Position)
Declared at: clang/include/clang/AST/ExternalASTSource.h:521
Parameters
- LazyVector<T, Source, Loader, LoadedStorage, LocalStorage>* Self
- int Position
¶iterator()
iterator()
Declared at: clang/include/clang/AST/ExternalASTSource.h:527