CBMC
forward_list_as_mapt< keyt, mappedt > Class Template Reference

Implementation of map-like interface using a forward list. More...

#include <forward_list_as_map.h>

+ Inheritance diagram for forward_list_as_mapt< keyt, mappedt >:
+ Collaboration diagram for forward_list_as_mapt< keyt, mappedt >:

Public Types

using implementationt = typename std::forward_list< std::pair< keyt, mappedt > >
 
using const_iterator = typename implementationt::const_iterator
 
using iterator = typename implementationt::iterator
 

Public Member Functions

 forward_list_as_mapt ()
 
 forward_list_as_mapt (std::initializer_list< std::pair< keyt, mappedt >> list)
 
void erase (const keyt &name)
 
const const_iterator find (const keyt &name) const
 
iterator add (const keyt &name)
 
mappedt & operator[] (const keyt &name)
 
mappedt & add (const keyt &name, mappedt irep)
 
mappedt & emplace (const keyt &name, const mappedt &irep)
 
std::size_t size () const
 

Private Member Functions

const_iterator lower_bound (const keyt &id) const
 
iterator mutable_lower_bound (const keyt &id)
 

Static Private Member Functions

static bool order (const std::pair< keyt, mappedt > &a, const keyt &b)
 

Detailed Description

template<typename keyt, typename mappedt>
class forward_list_as_mapt< keyt, mappedt >

Implementation of map-like interface using a forward list.

Definition at line 21 of file forward_list_as_map.h.

Member Typedef Documentation

◆ const_iterator

template<typename keyt , typename mappedt >
using forward_list_as_mapt< keyt, mappedt >::const_iterator = typename implementationt::const_iterator

Definition at line 25 of file forward_list_as_map.h.

◆ implementationt

template<typename keyt , typename mappedt >
using forward_list_as_mapt< keyt, mappedt >::implementationt = typename std::forward_list<std::pair<keyt, mappedt> >

Definition at line 24 of file forward_list_as_map.h.

◆ iterator

template<typename keyt , typename mappedt >
using forward_list_as_mapt< keyt, mappedt >::iterator = typename implementationt::iterator

Definition at line 26 of file forward_list_as_map.h.

Constructor & Destructor Documentation

◆ forward_list_as_mapt() [1/2]

template<typename keyt , typename mappedt >
forward_list_as_mapt< keyt, mappedt >::forward_list_as_mapt ( )
inline

Definition at line 28 of file forward_list_as_map.h.

◆ forward_list_as_mapt() [2/2]

template<typename keyt , typename mappedt >
forward_list_as_mapt< keyt, mappedt >::forward_list_as_mapt ( std::initializer_list< std::pair< keyt, mappedt >>  list)
inline

Definition at line 32 of file forward_list_as_map.h.

Member Function Documentation

◆ add() [1/2]

template<typename keyt , typename mappedt >
iterator forward_list_as_mapt< keyt, mappedt >::add ( const keyt &  name)
inline

Definition at line 60 of file forward_list_as_map.h.

◆ add() [2/2]

template<typename keyt , typename mappedt >
mappedt& forward_list_as_mapt< keyt, mappedt >::add ( const keyt &  name,
mappedt  irep 
)
inline

Definition at line 80 of file forward_list_as_map.h.

◆ emplace()

template<typename keyt , typename mappedt >
mappedt& forward_list_as_mapt< keyt, mappedt >::emplace ( const keyt &  name,
const mappedt &  irep 
)
inline

Definition at line 97 of file forward_list_as_map.h.

◆ erase()

template<typename keyt , typename mappedt >
void forward_list_as_mapt< keyt, mappedt >::erase ( const keyt &  name)
inline

Definition at line 37 of file forward_list_as_map.h.

◆ find()

template<typename keyt , typename mappedt >
const const_iterator forward_list_as_mapt< keyt, mappedt >::find ( const keyt &  name) const
inline

Definition at line 50 of file forward_list_as_map.h.

◆ lower_bound()

template<typename keyt , typename mappedt >
const_iterator forward_list_as_mapt< keyt, mappedt >::lower_bound ( const keyt &  id) const
inlineprivate

Definition at line 125 of file forward_list_as_map.h.

◆ mutable_lower_bound()

template<typename keyt , typename mappedt >
iterator forward_list_as_mapt< keyt, mappedt >::mutable_lower_bound ( const keyt &  id)
inlineprivate

Definition at line 130 of file forward_list_as_map.h.

◆ operator[]()

template<typename keyt , typename mappedt >
mappedt& forward_list_as_mapt< keyt, mappedt >::operator[] ( const keyt &  name)
inline

Definition at line 75 of file forward_list_as_map.h.

◆ order()

template<typename keyt , typename mappedt >
static bool forward_list_as_mapt< keyt, mappedt >::order ( const std::pair< keyt, mappedt > &  a,
const keyt &  b 
)
inlinestaticprivate

Definition at line 120 of file forward_list_as_map.h.

◆ size()

template<typename keyt , typename mappedt >
std::size_t forward_list_as_mapt< keyt, mappedt >::size ( ) const
inline

Definition at line 114 of file forward_list_as_map.h.


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