CBMC
numberingt< keyt, hasht > Class Template Referencefinal

#include <numbering.h>

+ Inheritance diagram for numberingt< keyt, hasht >:
+ Collaboration diagram for numberingt< keyt, hasht >:

Public Types

using number_type = std::size_t
 
using key_type = keyt
 
using size_type = typename data_typet::size_type
 
using iterator = typename data_typet::iterator
 
using const_iterator = typename data_typet::const_iterator
 

Public Member Functions

number_type number (const key_type &a)
 
std::optional< number_typeget_number (const key_type &a) const
 
void clear ()
 
size_type size () const
 
const key_typeat (size_type t) const
 
key_typeoperator[] (size_type t)
 
const key_typeoperator[] (size_type t) const
 
iterator begin ()
 
const_iterator begin () const
 
const_iterator cbegin () const
 
iterator end ()
 
const_iterator end () const
 
const_iterator cend () const
 

Private Types

using data_typet = std::vector< key_type >
 

Private Attributes

data_typet data_
 
std::unordered_map< keyt, number_type, hasht > numbers_
 

Detailed Description

template<typename keyt, typename hasht = std::hash<keyt>>
class numberingt< keyt, hasht >

Template Parameters
keytThe type of keys which will be numbered.
hashtThe type of hashing functor used to hash keys.

Definition at line 21 of file numbering.h.

Member Typedef Documentation

◆ const_iterator

template<typename keyt , typename hasht = std::hash<keyt>>
using numberingt< keyt, hasht >::const_iterator = typename data_typet::const_iterator

Definition at line 35 of file numbering.h.

◆ data_typet

template<typename keyt , typename hasht = std::hash<keyt>>
using numberingt< keyt, hasht >::data_typet = std::vector<key_type>
private

Definition at line 28 of file numbering.h.

◆ iterator

template<typename keyt , typename hasht = std::hash<keyt>>
using numberingt< keyt, hasht >::iterator = typename data_typet::iterator

Definition at line 34 of file numbering.h.

◆ key_type

template<typename keyt , typename hasht = std::hash<keyt>>
using numberingt< keyt, hasht >::key_type = keyt

Definition at line 25 of file numbering.h.

◆ number_type

template<typename keyt , typename hasht = std::hash<keyt>>
using numberingt< keyt, hasht >::number_type = std::size_t

Definition at line 24 of file numbering.h.

◆ size_type

template<typename keyt , typename hasht = std::hash<keyt>>
using numberingt< keyt, hasht >::size_type = typename data_typet::size_type

Definition at line 33 of file numbering.h.

Member Function Documentation

◆ at()

template<typename keyt , typename hasht = std::hash<keyt>>
const key_type& numberingt< keyt, hasht >::at ( size_type  t) const
inline

Definition at line 71 of file numbering.h.

◆ begin() [1/2]

template<typename keyt , typename hasht = std::hash<keyt>>
iterator numberingt< keyt, hasht >::begin ( )
inline

Definition at line 85 of file numbering.h.

◆ begin() [2/2]

template<typename keyt , typename hasht = std::hash<keyt>>
const_iterator numberingt< keyt, hasht >::begin ( ) const
inline

Definition at line 89 of file numbering.h.

◆ cbegin()

template<typename keyt , typename hasht = std::hash<keyt>>
const_iterator numberingt< keyt, hasht >::cbegin ( ) const
inline

Definition at line 93 of file numbering.h.

◆ cend()

template<typename keyt , typename hasht = std::hash<keyt>>
const_iterator numberingt< keyt, hasht >::cend ( ) const
inline

Definition at line 106 of file numbering.h.

◆ clear()

template<typename keyt , typename hasht = std::hash<keyt>>
void numberingt< keyt, hasht >::clear ( void  )
inline

Definition at line 60 of file numbering.h.

◆ end() [1/2]

template<typename keyt , typename hasht = std::hash<keyt>>
iterator numberingt< keyt, hasht >::end ( )
inline

Definition at line 98 of file numbering.h.

◆ end() [2/2]

template<typename keyt , typename hasht = std::hash<keyt>>
const_iterator numberingt< keyt, hasht >::end ( ) const
inline

Definition at line 102 of file numbering.h.

◆ get_number()

template<typename keyt , typename hasht = std::hash<keyt>>
std::optional<number_type> numberingt< keyt, hasht >::get_number ( const key_type a) const
inline

Definition at line 50 of file numbering.h.

◆ number()

template<typename keyt , typename hasht = std::hash<keyt>>
number_type numberingt< keyt, hasht >::number ( const key_type a)
inline

Definition at line 37 of file numbering.h.

◆ operator[]() [1/2]

template<typename keyt , typename hasht = std::hash<keyt>>
key_type& numberingt< keyt, hasht >::operator[] ( size_type  t)
inline

Definition at line 76 of file numbering.h.

◆ operator[]() [2/2]

template<typename keyt , typename hasht = std::hash<keyt>>
const key_type& numberingt< keyt, hasht >::operator[] ( size_type  t) const
inline

Definition at line 80 of file numbering.h.

◆ size()

template<typename keyt , typename hasht = std::hash<keyt>>
size_type numberingt< keyt, hasht >::size ( ) const
inline

Definition at line 66 of file numbering.h.

Member Data Documentation

◆ data_

template<typename keyt , typename hasht = std::hash<keyt>>
data_typet numberingt< keyt, hasht >::data_
private

Definition at line 29 of file numbering.h.

◆ numbers_

template<typename keyt , typename hasht = std::hash<keyt>>
std::unordered_map<keyt, number_type, hasht> numberingt< keyt, hasht >::numbers_
private

Definition at line 30 of file numbering.h.


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