Data Structures & Algorithms in C++
Goodrich, Tamassia, Mount and Goldwasser
Loading...
Searching...
No Matches
Data Structures | Public Member Functions | Protected Member Functions
dsac::map::AbstractMap< Key, Value > Class Template Referenceabstract

#include <abstract_map.h>

Inheritance diagram for dsac::map::AbstractMap< Key, Value >:
Inheritance graph
Collaboration diagram for dsac::map::AbstractMap< Key, Value >:
Collaboration graph

Data Structures

class  abstract_iter_rep
 
class  const_iterator
 
class  Entry
 

Public Member Functions

bool empty () const
 Returns true if the map is empty, false otherwise.
 
bool contains (const Key &k) const
 Returns true if the map contains an entry with the given key.
 
const Value & at (const Key &k) const
 
bool erase (const Key &k)
 
virtual ~AbstractMap ()
 
virtual int size () const =0
 
virtual const_iterator begin () const =0
 
virtual const_iterator end () const =0
 
virtual const_iterator find (const Key &k) const =0
 
virtual const_iterator put (const Key &k, const Value &v)=0
 
virtual const_iterator erase (const_iterator loc)=0
 

Protected Member Functions

abstract_iter_repget_rep (const_iterator iter) const
 
void update_value (const Entry &e, const Value &v)
 

Constructor & Destructor Documentation

◆ ~AbstractMap()

template<typename Key , typename Value >
virtual dsac::map::AbstractMap< Key, Value >::~AbstractMap ( )
inlinevirtual

Member Function Documentation

◆ at()

template<typename Key , typename Value >
const Value & dsac::map::AbstractMap< Key, Value >::at ( const Key &  k) const
inline

Returns a reference to the value associated with given key, or throws out_of_range exception if key not found

Here is the call graph for this function:

◆ begin()

template<typename Key , typename Value >
virtual const_iterator dsac::map::AbstractMap< Key, Value >::begin ( ) const
pure virtual

◆ contains()

template<typename Key , typename Value >
bool dsac::map::AbstractMap< Key, Value >::contains ( const Key &  k) const
inline

Returns true if the map contains an entry with the given key.

Here is the call graph for this function:

◆ empty()

template<typename Key , typename Value >
bool dsac::map::AbstractMap< Key, Value >::empty ( ) const
inline

Returns true if the map is empty, false otherwise.

Here is the call graph for this function:

◆ end()

template<typename Key , typename Value >
virtual const_iterator dsac::map::AbstractMap< Key, Value >::end ( ) const
pure virtual

◆ erase() [1/2]

template<typename Key , typename Value >
bool dsac::map::AbstractMap< Key, Value >::erase ( const Key &  k)
inline

Erases entry with given key (if one exists) Returns true if an entry was removed, false otherwise

Here is the call graph for this function:

◆ erase() [2/2]

template<typename Key , typename Value >
virtual const_iterator dsac::map::AbstractMap< Key, Value >::erase ( const_iterator  loc)
pure virtual

◆ find()

template<typename Key , typename Value >
virtual const_iterator dsac::map::AbstractMap< Key, Value >::find ( const Key &  k) const
pure virtual

◆ get_rep()

template<typename Key , typename Value >
abstract_iter_rep * dsac::map::AbstractMap< Key, Value >::get_rep ( const_iterator  iter) const
inlineprotected

◆ put()

template<typename Key , typename Value >
virtual const_iterator dsac::map::AbstractMap< Key, Value >::put ( const Key &  k,
const Value &  v 
)
pure virtual

◆ size()

template<typename Key , typename Value >
virtual int dsac::map::AbstractMap< Key, Value >::size ( ) const
pure virtual

◆ update_value()

template<typename Key , typename Value >
void dsac::map::AbstractMap< Key, Value >::update_value ( const Entry e,
const Value &  v 
)
inlineprotected

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