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

#include <mim/util/indexmap.h>

Inheritance diagram for mim::IndexMap< Indexer, Key, Value >:
[legend]

Public Member Functions

 IndexMap (const IndexMap &other)
 
 IndexMap (IndexMap &&other) noexcept
 
 IndexMap (const Indexer &indexer, const Value &value=Value())
 
 IndexMap (const Indexer &indexer, View< Value > array)
 
template<class I >
 IndexMap (const Indexer &indexer, const I begin, const I end)
 
IndexMapoperator= (IndexMap other) noexcept
 
const Indexer & indexer () const
 
size_t capacity () const
 
Value & operator[] (Key key)
 
const Value & operator[] (Key key) const
 
auto & array ()
 
const auto & array () const
 
Value & array (size_t i)
 
const Value & array (size_t i) const
 
auto begin () const
 
auto end () const
 

Friends

void swap (IndexMap &map1, IndexMap &map2) noexcept
 

Detailed Description

template<class Indexer, class Key, class Value>
class mim::IndexMap< Indexer, Key, Value >

Definition at line 9 of file indexmap.h.

Constructor & Destructor Documentation

◆ IndexMap() [1/5]

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

Definition at line 20 of file indexmap.h.

◆ IndexMap() [2/5]

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

Definition at line 23 of file indexmap.h.

◆ IndexMap() [3/5]

template<class Indexer , class Key , class Value >
mim::IndexMap< Indexer, Key, Value >::IndexMap ( const Indexer & indexer,
const Value & value = Value() )
inline

Definition at line 26 of file indexmap.h.

◆ IndexMap() [4/5]

template<class Indexer , class Key , class Value >
mim::IndexMap< Indexer, Key, Value >::IndexMap ( const Indexer & indexer,
View< Value > array )
inline

Definition at line 29 of file indexmap.h.

◆ IndexMap() [5/5]

template<class Indexer , class Key , class Value >
template<class I >
mim::IndexMap< Indexer, Key, Value >::IndexMap ( const Indexer & indexer,
const I begin,
const I end )
inline

Definition at line 33 of file indexmap.h.

Member Function Documentation

◆ array() [1/4]

template<class Indexer , class Key , class Value >
auto & mim::IndexMap< Indexer, Key, Value >::array ( )
inline

Definition at line 46 of file indexmap.h.

Referenced by mim::find().

◆ array() [2/4]

template<class Indexer , class Key , class Value >
const auto & mim::IndexMap< Indexer, Key, Value >::array ( ) const
inline

Definition at line 47 of file indexmap.h.

◆ array() [3/4]

template<class Indexer , class Key , class Value >
Value & mim::IndexMap< Indexer, Key, Value >::array ( size_t i)
inline

Definition at line 48 of file indexmap.h.

◆ array() [4/4]

template<class Indexer , class Key , class Value >
const Value & mim::IndexMap< Indexer, Key, Value >::array ( size_t i) const
inline

Definition at line 49 of file indexmap.h.

◆ begin()

template<class Indexer , class Key , class Value >
auto mim::IndexMap< Indexer, Key, Value >::begin ( ) const
inline

Definition at line 51 of file indexmap.h.

◆ capacity()

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

Definition at line 39 of file indexmap.h.

◆ end()

template<class Indexer , class Key , class Value >
auto mim::IndexMap< Indexer, Key, Value >::end ( ) const
inline

Definition at line 52 of file indexmap.h.

◆ indexer()

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

Definition at line 38 of file indexmap.h.

Referenced by mim::find(), and mim::IndexMap< Indexer, Key, Value >::operator[]().

◆ operator=()

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

Definition at line 36 of file indexmap.h.

References mim::IndexMap< Indexer, Key, Value >::swap.

◆ operator[]() [1/2]

template<class Indexer , class Key , class Value >
Value & mim::IndexMap< Indexer, Key, Value >::operator[] ( Key key)
inline

Definition at line 40 of file indexmap.h.

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

◆ operator[]() [2/2]

template<class Indexer , class Key , class Value >
const Value & mim::IndexMap< Indexer, Key, Value >::operator[] ( Key key) const
inline

Definition at line 45 of file indexmap.h.

Friends And Related Symbol Documentation

◆ swap

template<class Indexer , class Key , class Value >
void swap ( IndexMap< Indexer, Key, Value > & map1,
IndexMap< Indexer, Key, Value > & map2 )
friend

Definition at line 54 of file indexmap.h.

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


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