MimIR 0.1
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
mim::PooledSet< T > Class Template Reference

Ordered set maintained in a consecutive buffer and unified in Pool. More...

#include <mim/util/pool.h>

Inheritance diagram for mim::PooledSet< T >:
[legend]

Classes

struct  Data
 

Public Member Functions

Getters
constexpr operator bool () const noexcept
 Is not empty?
 
constexpr bool empty () const noexcept
 
constexpr size_t size () const noexcept
 
constexpr const T & operator[] (size_t i) const
 
constexpr const T & front () const
 
constexpr const T * elems () const
 
constexpr bool contains (const T &elem) const
 
bool intersects (PooledSet< T > other)
 Is $this \cup other \neq \emptyset$?
 
Comparisons
constexpr bool operator== (PooledSet< T > other) const noexcept
 
constexpr bool operator!= (PooledSet< T > other) const noexcept
 
Iterators
constexpr auto begin () const noexcept
 
constexpr auto end () const noexcept
 
constexpr auto cbegin () const noexcept
 
constexpr auto cend () const noexcept
 
constexpr auto rbegin () const noexcept
 
constexpr auto rend () const noexcept
 
constexpr auto crbegin () const noexcept
 
constexpr auto crend () const noexcept
 

Friends

class Pool< T >
 
template<class H >
AbslHashValue (H h, PooledSet< T > set)
 

Construction & Destruction

constexpr PooledSet () noexcept=default
 
constexpr PooledSet (const PooledSet &) noexcept=default
 
constexpr PooledSetoperator= (const PooledSet &) noexcept=default
 
constexpr void clear () noexcept
 

Detailed Description

template<class T>
class mim::PooledSet< T >

Ordered set maintained in a consecutive buffer and unified in Pool.

Definition at line 19 of file pool.h.

Constructor & Destructor Documentation

◆ PooledSet() [1/2]

template<class T >
mim::PooledSet< T >::PooledSet ( )
constexprdefaultnoexcept

◆ PooledSet() [2/2]

template<class T >
mim::PooledSet< T >::PooledSet ( const PooledSet< T > & )
constexprdefaultnoexcept

Member Function Documentation

◆ begin()

template<class T >
auto mim::PooledSet< T >::begin ( ) const
inlineconstexprnoexcept

◆ cbegin()

template<class T >
auto mim::PooledSet< T >::cbegin ( ) const
inlineconstexprnoexcept

Definition at line 96 of file pool.h.

References mim::PooledSet< T >::elems().

◆ cend()

template<class T >
auto mim::PooledSet< T >::cend ( ) const
inlineconstexprnoexcept

Definition at line 97 of file pool.h.

References mim::PooledSet< T >::end().

◆ clear()

template<class T >
void mim::PooledSet< T >::clear ( )
inlineconstexprnoexcept

Definition at line 55 of file pool.h.

◆ contains()

template<class T >
bool mim::PooledSet< T >::contains ( const T & elem) const
inlineconstexpr

◆ crbegin()

template<class T >
auto mim::PooledSet< T >::crbegin ( ) const
inlineconstexprnoexcept

Definition at line 100 of file pool.h.

References mim::PooledSet< T >::rbegin().

◆ crend()

template<class T >
auto mim::PooledSet< T >::crend ( ) const
inlineconstexprnoexcept

Definition at line 101 of file pool.h.

References mim::PooledSet< T >::rend().

◆ elems()

template<class T >
const T * mim::PooledSet< T >::elems ( ) const
inlineconstexpr

◆ empty()

template<class T >
bool mim::PooledSet< T >::empty ( ) const
inlineconstexprnoexcept

◆ end()

◆ front()

template<class T >
const T & mim::PooledSet< T >::front ( ) const
inlineconstexpr

Definition at line 64 of file pool.h.

◆ intersects()

template<class T >
bool mim::PooledSet< T >::intersects ( PooledSet< T > other)
inlinenodiscard

Is $this \cup other \neq \emptyset$?

Definition at line 69 of file pool.h.

References mim::PooledSet< T >::begin(), and mim::PooledSet< T >::end().

Referenced by mim::VarRewriter::rewrite_mut().

◆ operator bool()

template<class T >
mim::PooledSet< T >::operator bool ( ) const
inlineexplicitconstexprnoexcept

Is not empty?

Definition at line 60 of file pool.h.

◆ operator!=()

template<class T >
bool mim::PooledSet< T >::operator!= ( PooledSet< T > other) const
inlineconstexprnoexcept

Definition at line 89 of file pool.h.

◆ operator=()

template<class T >
PooledSet & mim::PooledSet< T >::operator= ( const PooledSet< T > & )
constexprdefaultnoexcept

◆ operator==()

template<class T >
bool mim::PooledSet< T >::operator== ( PooledSet< T > other) const
inlineconstexprnoexcept

Definition at line 88 of file pool.h.

◆ operator[]()

template<class T >
const T & mim::PooledSet< T >::operator[] ( size_t i) const
inlineconstexpr

Definition at line 63 of file pool.h.

References mim::PooledSet< T >::Data::elems.

◆ rbegin()

template<class T >
auto mim::PooledSet< T >::rbegin ( ) const
inlineconstexprnoexcept

Definition at line 98 of file pool.h.

References mim::PooledSet< T >::end().

Referenced by mim::PooledSet< T >::crbegin().

◆ rend()

template<class T >
auto mim::PooledSet< T >::rend ( ) const
inlineconstexprnoexcept

Definition at line 99 of file pool.h.

References mim::PooledSet< T >::begin().

Referenced by mim::PooledSet< T >::crend().

◆ size()

template<class T >
size_t mim::PooledSet< T >::size ( ) const
inlineconstexprnoexcept

Friends And Related Symbol Documentation

◆ AbslHashValue

template<class T >
template<class H >
H AbslHashValue ( H h,
PooledSet< T > set )
friend

Definition at line 107 of file pool.h.

◆ Pool< T >

template<class T >
friend class Pool< T >
friend

Definition at line 107 of file pool.h.


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