WPILibC++  2019.3.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
wpi::DebugEpochBase::HandleBase Class Reference

A base class for iterator classes ("handles") that wish to poll for iterator invalidating modifications in the underlying data structure. More...

#include <EpochTracker.h>

Inheritance diagram for wpi::DebugEpochBase::HandleBase:
wpi::DenseMapIterator< KeyT, ValueT, KeyInfoT, Bucket, IsConst >

Public Member Functions

 HandleBase (const DebugEpochBase *Parent)
 
bool isHandleInSync () const
 Returns true if the DebugEpochBase this Handle is linked to has not called incrementEpoch on itself since the creation of this HandleBase instance. More...
 
const void * getEpochAddress () const
 Returns a pointer to the epoch word stored in the data structure this handle points into. More...
 

Detailed Description

A base class for iterator classes ("handles") that wish to poll for iterator invalidating modifications in the underlying data structure.

When LLVM is built without asserts, this class is empty and does nothing.

HandleBase does not track the parent data structure by itself. It expects the routines modifying the data structure to call incrementEpoch when they make an iterator-invalidating modification.

Member Function Documentation

const void* wpi::DebugEpochBase::HandleBase::getEpochAddress ( ) const
inline

Returns a pointer to the epoch word stored in the data structure this handle points into.

Can be used to check if two iterators point into the same data structure.

bool wpi::DebugEpochBase::HandleBase::isHandleInSync ( ) const
inline

Returns true if the DebugEpochBase this Handle is linked to has not called incrementEpoch on itself since the creation of this HandleBase instance.


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