MicroModelicaCCompiler  4.5.3
ModelTable< Key, Value > Class Template Reference

#include <table.hpp>

Public Types

typedef std::map< Key, Value >::iterator iterator
 
typedef std::map< Key, Value >::const_iterator const_iterator
 

Public Member Functions

 ModelTable ()
 
 ~ModelTable ()=default
 
void insert (Key k, Value v)
 
Option< Value > operator[] (Key k) const
 
void remove (Key k)
 
bool lookup (Key key)
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
Value begin (iterator &it)
 
bool end (iterator &it)
 
Value next (iterator &it)
 
Value value (iterator &it)
 
Value value (int pos)
 
Key key (iterator &it)
 
void merge (ModelTable< Key, Value > other)
 
Value first ()
 
void clear ()
 
bool empty ()
 
const int size () const
 
std::list< Key > keys ()
 

Protected Member Functions

std::map< Key, Value > map () const
 

Private Attributes

std::map< Key, Value > _map
 

Detailed Description

template<typename Key, typename Value>
class ModelTable< Key, Value >

Definition at line 27 of file table.hpp.

Member Typedef Documentation

◆ const_iterator

template<typename Key , typename Value >
typedef std::map<Key, Value>::const_iterator ModelTable< Key, Value >::const_iterator

Definition at line 62 of file table.hpp.

◆ iterator

template<typename Key , typename Value >
typedef std::map<Key, Value>::iterator ModelTable< Key, Value >::iterator

Definition at line 61 of file table.hpp.

Constructor & Destructor Documentation

◆ ModelTable()

template<typename Key , typename Value >
ModelTable< Key, Value >::ModelTable ( )
inline

Definition at line 46 of file table.hpp.

◆ ~ModelTable()

template<typename Key , typename Value >
ModelTable< Key, Value >::~ModelTable ( )
default

Member Function Documentation

◆ begin() [1/3]

◆ begin() [2/3]

template<typename Key , typename Value >
const_iterator ModelTable< Key, Value >::begin ( ) const
inline

Definition at line 69 of file table.hpp.

◆ begin() [3/3]

template<typename Key , typename Value >
Value ModelTable< Key, Value >::begin ( iterator it)
inline

Definition at line 72 of file table.hpp.

◆ clear()

template<typename Key , typename Value >
void ModelTable< Key, Value >::clear ( )
inline

Definition at line 107 of file table.hpp.

◆ empty()

template<typename Key , typename Value >
bool ModelTable< Key, Value >::empty ( )
inline

◆ end() [1/3]

◆ end() [2/3]

template<typename Key , typename Value >
const_iterator ModelTable< Key, Value >::end ( ) const
inline

Definition at line 71 of file table.hpp.

◆ end() [3/3]

template<typename Key , typename Value >
bool ModelTable< Key, Value >::end ( iterator it)
inline

Definition at line 77 of file table.hpp.

◆ first()

template<typename Key , typename Value >
Value ModelTable< Key, Value >::first ( )
inline

Definition at line 102 of file table.hpp.

◆ insert()

◆ key()

◆ keys()

template<typename Key , typename Value >
std::list<Key> ModelTable< Key, Value >::keys ( )
inline

Definition at line 111 of file table.hpp.

◆ lookup()

template<typename Key , typename Value >
bool ModelTable< Key, Value >::lookup ( Key  key)
inline

Definition at line 63 of file table.hpp.

Referenced by MicroModelica::Generator::Function::~Function().

◆ map()

template<typename Key , typename Value >
std::map<Key, Value> ModelTable< Key, Value >::map ( ) const
inlineprotected

Definition at line 122 of file table.hpp.

◆ merge()

template<typename Key , typename Value >
void ModelTable< Key, Value >::merge ( ModelTable< Key, Value >  other)
inline

◆ next()

◆ operator[]()

template<typename Key , typename Value >
Option<Value> ModelTable< Key, Value >::operator[] ( Key  k) const
inline

Definition at line 53 of file table.hpp.

◆ remove()

template<typename Key , typename Value >
void ModelTable< Key, Value >::remove ( Key  k)
inline

Definition at line 60 of file table.hpp.

◆ size()

template<typename Key , typename Value >
const int ModelTable< Key, Value >::size ( ) const
inline

◆ value() [1/2]

template<typename Key , typename Value >
Value ModelTable< Key, Value >::value ( int  pos)
inline

Definition at line 84 of file table.hpp.

◆ value() [2/2]

template<typename Key , typename Value >
Value ModelTable< Key, Value >::value ( iterator it)
inline

Definition at line 83 of file table.hpp.

Member Data Documentation

◆ _map

template<typename Key , typename Value >
std::map<Key, Value> ModelTable< Key, Value >::_map
private

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