MimIR 0.1
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
mim::IndexSet< Indexer, Key > Class Template Reference

#include <mim/util/indexset.h>

Classes

class  reference
 

Public Member Functions

 IndexSet (const Indexer &indexer)
 
 IndexSet (const IndexSet &other)
 
 IndexSet (IndexSet &&other) noexcept
 
IndexSetoperator= (IndexSet other) noexcept
 
const Indexer & indexer () const
 
size_t capacity () const
 
size_t next (size_t pos=0)
 
reference operator[] (Key key)
 
bool operator[] (Key key) const
 
template<bool flag>
bool set (Key key)
 Depending on flag this method either inserts (true) or removes (false) key and returns true if successful.
 
bool insert (Key key)
 Inserts key and returns true if successful.
 
bool erase (Key key)
 Erase key and returns true if successful.
 
bool contains (Key key) const
 
void clear ()
 
template<class Op >
IndexSettransform (const IndexSet &other, Op op)
 
IndexSetoperator&= (const IndexSet &other)
 
IndexSetoperator|= (const IndexSet &other)
 
IndexSetoperator^= (const IndexSet &other)
 

Friends

void swap (IndexSet &set1, IndexSet &set2) noexcept
 

Detailed Description

template<class Indexer, class Key>
class mim::IndexSet< Indexer, Key >

Definition at line 7 of file indexset.h.

Constructor & Destructor Documentation

◆ IndexSet() [1/3]

template<class Indexer , class Key >
mim::IndexSet< Indexer, Key >::IndexSet ( const Indexer & indexer)
inline

Definition at line 37 of file indexset.h.

◆ IndexSet() [2/3]

template<class Indexer , class Key >
mim::IndexSet< Indexer, Key >::IndexSet ( const IndexSet< Indexer, Key > & other)
inline

Definition at line 40 of file indexset.h.

◆ IndexSet() [3/3]

template<class Indexer , class Key >
mim::IndexSet< Indexer, Key >::IndexSet ( IndexSet< Indexer, Key > && other)
inlinenoexcept

Definition at line 43 of file indexset.h.

Member Function Documentation

◆ capacity()

template<class Indexer , class Key >
size_t mim::IndexSet< Indexer, Key >::capacity ( ) const
inline

◆ clear()

template<class Indexer , class Key >
void mim::IndexSet< Indexer, Key >::clear ( )
inline

Definition at line 72 of file indexset.h.

◆ contains()

template<class Indexer , class Key >
bool mim::IndexSet< Indexer, Key >::contains ( Key key) const
inline

Definition at line 71 of file indexset.h.

Referenced by mim::visit_first().

◆ erase()

template<class Indexer , class Key >
bool mim::IndexSet< Indexer, Key >::erase ( Key key)
inline

Erase key and returns true if successful.

Definition at line 70 of file indexset.h.

References mim::IndexSet< Indexer, Key >::set().

◆ indexer()

template<class Indexer , class Key >
const Indexer & mim::IndexSet< Indexer, Key >::indexer ( ) const
inline

◆ insert()

template<class Indexer , class Key >
bool mim::IndexSet< Indexer, Key >::insert ( Key key)
inline

Inserts key and returns true if successful.

Definition at line 69 of file indexset.h.

References mim::IndexSet< Indexer, Key >::set().

Referenced by mim::visit().

◆ next()

template<class Indexer , class Key >
size_t mim::IndexSet< Indexer, Key >::next ( size_t pos = 0)
inline

Definition at line 50 of file indexset.h.

References mim::IndexSet< Indexer, Key >::capacity().

◆ operator&=()

template<class Indexer , class Key >
IndexSet & mim::IndexSet< Indexer, Key >::operator&= ( const IndexSet< Indexer, Key > & other)
inline

Definition at line 79 of file indexset.h.

References mim::IndexSet< Indexer, Key >::transform().

◆ operator=()

template<class Indexer , class Key >
IndexSet & mim::IndexSet< Indexer, Key >::operator= ( IndexSet< Indexer, Key > other)
inlinenoexcept

Definition at line 46 of file indexset.h.

References mim::IndexSet< Indexer, Key >::swap.

◆ operator[]() [1/2]

template<class Indexer , class Key >
reference mim::IndexSet< Indexer, Key >::operator[] ( Key key)
inline

Definition at line 55 of file indexset.h.

References mim::IndexSet< Indexer, Key >::indexer().

◆ operator[]() [2/2]

template<class Indexer , class Key >
bool mim::IndexSet< Indexer, Key >::operator[] ( Key key) const
inline

Definition at line 60 of file indexset.h.

◆ operator^=()

template<class Indexer , class Key >
IndexSet & mim::IndexSet< Indexer, Key >::operator^= ( const IndexSet< Indexer, Key > & other)
inline

Definition at line 81 of file indexset.h.

References mim::IndexSet< Indexer, Key >::transform().

◆ operator|=()

template<class Indexer , class Key >
IndexSet & mim::IndexSet< Indexer, Key >::operator|= ( const IndexSet< Indexer, Key > & other)
inline

Definition at line 80 of file indexset.h.

References mim::IndexSet< Indexer, Key >::transform().

◆ set()

template<class Indexer , class Key >
template<bool flag>
bool mim::IndexSet< Indexer, Key >::set ( Key key)
inline

Depending on flag this method either inserts (true) or removes (false) key and returns true if successful.

Definition at line 63 of file indexset.h.

Referenced by mim::IndexSet< Indexer, Key >::erase(), and mim::IndexSet< Indexer, Key >::insert().

◆ transform()

template<class Indexer , class Key >
template<class Op >
IndexSet & mim::IndexSet< Indexer, Key >::transform ( const IndexSet< Indexer, Key > & other,
Op op )
inline

Friends And Related Symbol Documentation

◆ swap

template<class Indexer , class Key >
void swap ( IndexSet< Indexer, Key > & set1,
IndexSet< Indexer, Key > & set2 )
friend

Definition at line 82 of file indexset.h.

Referenced by mim::IndexSet< Indexer, Key >::operator=().


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