dlinear  0.0.1
Delta-complete SMT solver for linear programming
Loading...
Searching...
No Matches
dlinear::ScopedUnorderedMap< Key, T, Hash, KeyEqual, Allocator > Class Template Reference

Public Types

enum class  ActionKind { INSERT , UPDATE }
 Action to perform on the scoped unordered map. More...
 

Public Member Functions

void clear ()
 Clear the map.
 
void insert (const Key &k, const T &v)
 Insert a new key-value pair.
 
const T & operator[] (const Key &key) const
 Lookup the value for the given key.
 
const T & at (const Key &key) const
 Lookup the value for the given key.
 

Private Attributes

std::vector< Action > actions_
 Vector of actions that have been applied.
 
UnorderedMapType map_
 Actual map.
 

Detailed Description

template<class Key, class T, class Hash = std::hash<Key>, class KeyEqual = std::equal_to<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
class dlinear::ScopedUnorderedMap< Key, T, Hash, KeyEqual, Allocator >

Definition at line 26 of file ScopedUnorderedMap.hpp.

Member Enumeration Documentation

◆ ActionKind

template<class Key , class T , class Hash = std::hash<Key>, class KeyEqual = std::equal_to<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
enum class dlinear::ScopedUnorderedMap::ActionKind
strong

Action to perform on the scoped unordered map.

Enumerator
INSERT 

Insert(k, v) means that (k, v) is inserted.

UPDATE 

Update(k, v) means that (k, v) was replaced by a new value.

Definition at line 37 of file ScopedUnorderedMap.hpp.

Member Function Documentation

◆ at()

template<class Key , class T , class Hash = std::hash<Key>, class KeyEqual = std::equal_to<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
const T & dlinear::ScopedUnorderedMap< Key, T, Hash, KeyEqual, Allocator >::at ( const Key & key) const
inline

Lookup the value for the given key.

Parameters
keykey to use for the lookup
Exceptions
runtime_errorif the key does not exist
Returns
element with the given key, if it exists

Definition at line 109 of file ScopedUnorderedMap.hpp.

◆ insert()

template<class Key , class T , class Hash = std::hash<Key>, class KeyEqual = std::equal_to<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
void dlinear::ScopedUnorderedMap< Key, T, Hash, KeyEqual, Allocator >::insert ( const Key & k,
const T & v )
inline

Insert a new key-value pair.

Parameters
kkey
vvalue

Definition at line 75 of file ScopedUnorderedMap.hpp.

◆ operator[]()

template<class Key , class T , class Hash = std::hash<Key>, class KeyEqual = std::equal_to<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
const T & dlinear::ScopedUnorderedMap< Key, T, Hash, KeyEqual, Allocator >::operator[] ( const Key & key) const
inline

Lookup the value for the given key.

Parameters
keykey to use for the lookup
Exceptions
runtime_errorif the key does not exist
Returns
element with the given key, if it exists

Definition at line 95 of file ScopedUnorderedMap.hpp.


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