Honeycomb  0.1
Component-Model Framework
Classes | Public Types | Public Member Functions | Friends | List of all members
honey::MtMapCommon< Subclass, Key_, Val_, List_ > Class Template Reference

Common functions between map elem and the map tail specialization. Use through class MtMapElem. More...

#include <MtMap.h>

Classes

struct  empty_
 Check if empty at compile-time. More...
 
struct  hasKey_
 Check if key exists at compile-time. More...
 
struct  size_
 Get size of map at compile-time. More...
 

Public Types

typedef Key_ Key
 Key type. More...
 
typedef Val_ Val
 Value type. More...
 
typedef List_ List
 Rest of map. More...
 
template<class Key >
using getResult = typename findElem< Key >::type::Val
 Result type of get() More...
 
typedef MtMapIter< Subclass > beginResult
 Result type of begin() More...
 
typedef MtMapIter< const Subclass > beginResult_const
 
typedef MtMapIter< Subclass, MtMapTailendResult
 Result type of end() More...
 
typedef MtMapIter< const Subclass, MtMapTailendResult_const
 
template<class Key >
using iterResult = MtMapIter< Subclass, typename findElem< Key >::type >
 Result type of iter() More...
 
template<class Key >
using iterResult_const = MtMapIter< const Subclass, typename findElem< Key >::type >
 
template<class... Pairs>
using insertResult = typename insertResult_< Pairs... >::type
 Result type of insert(). New pairs are inserted at the front. More...
 
template<class... Keys>
using eraseResult = typename eraseResult_< isTail, Keys... >::type
 Result type of erase(). Reconstructs type without matching keys. More...
 
typedef clearResult_::type clearResult
 Result type of clear() More...
 

Public Member Functions

template<class Key >
bool hasKey (Key) const
 Check if has key. More...
 
beginResult begin ()
 Get beginning of an iterator over keys and values of this map. More...
 
beginResult_const begin () const
 
endResult end ()
 Get end of an iterator over keys and values of this map. More...
 
endResult_const end () const
 
template<class Key >
iterResult< Keyiter (Key)
 Get iterator to element by key. More...
 
template<class Key >
iterResult_const< Keyiter (Key) const
 
template<class... Pairs>
insertResult_seq< honey::priv::PairSeqGen< Pairs... >, Pairs... >::type insert (Pairs &&...pairs) const
 Insert pairs of the form (key() = value) into the map. More...
 
template<class... Keys>
eraseResult< Keys... > erase (Keys...) const
 Erase keys from the map. More...
 
clearResult clear ()
 Clear map of all keys. More...
 
szt size () const
 Get size of map. More...
 
bool empty () const
 Check if empty. More...
 

Friends

template<class , class , class , class >
class MtMapCommon
 
template<class , class >
class MtMapIter
 
ostream & operator<< (ostream &os, const Subclass &map)
 

Detailed Description

template<class Subclass, class Key_, class Val_, class List_>
class honey::MtMapCommon< Subclass, Key_, Val_, List_ >

Common functions between map elem and the map tail specialization. Use through class MtMapElem.

Member Typedef Documentation

template<class Subclass, class Key_, class Val_, class List_>
typedef MtMapIter<Subclass> honey::MtMapCommon< Subclass, Key_, Val_, List_ >::beginResult

Result type of begin()

template<class Subclass, class Key_, class Val_, class List_>
typedef MtMapIter<const Subclass> honey::MtMapCommon< Subclass, Key_, Val_, List_ >::beginResult_const
template<class Subclass, class Key_, class Val_, class List_>
typedef clearResult_ ::type honey::MtMapCommon< Subclass, Key_, Val_, List_ >::clearResult

Result type of clear()

template<class Subclass, class Key_, class Val_, class List_>
typedef MtMapIter<Subclass, MtMapTail> honey::MtMapCommon< Subclass, Key_, Val_, List_ >::endResult

Result type of end()

template<class Subclass, class Key_, class Val_, class List_>
typedef MtMapIter<const Subclass, MtMapTail> honey::MtMapCommon< Subclass, Key_, Val_, List_ >::endResult_const
template<class Subclass, class Key_, class Val_, class List_>
template<class... Keys>
using honey::MtMapCommon< Subclass, Key_, Val_, List_ >::eraseResult = typename eraseResult_<isTail, Keys...>::type

Result type of erase(). Reconstructs type without matching keys.

template<class Subclass, class Key_, class Val_, class List_>
template<class Key >
using honey::MtMapCommon< Subclass, Key_, Val_, List_ >::getResult = typename findElem<Key>::type::Val

Result type of get()

template<class Subclass, class Key_, class Val_, class List_>
template<class... Pairs>
using honey::MtMapCommon< Subclass, Key_, Val_, List_ >::insertResult = typename insertResult_<Pairs...>::type

Result type of insert(). New pairs are inserted at the front.

template<class Subclass, class Key_, class Val_, class List_>
template<class Key >
using honey::MtMapCommon< Subclass, Key_, Val_, List_ >::iterResult = MtMapIter<Subclass, typename findElem<Key>::type>

Result type of iter()

template<class Subclass, class Key_, class Val_, class List_>
template<class Key >
using honey::MtMapCommon< Subclass, Key_, Val_, List_ >::iterResult_const = MtMapIter<const Subclass, typename findElem<Key>::type>
template<class Subclass, class Key_, class Val_, class List_>
typedef Key_ honey::MtMapCommon< Subclass, Key_, Val_, List_ >::Key

Key type.

template<class Subclass, class Key_, class Val_, class List_>
typedef List_ honey::MtMapCommon< Subclass, Key_, Val_, List_ >::List

Rest of map.

template<class Subclass, class Key_, class Val_, class List_>
typedef Val_ honey::MtMapCommon< Subclass, Key_, Val_, List_ >::Val

Value type.

Member Function Documentation

template<class Subclass, class Key_, class Val_, class List_>
beginResult honey::MtMapCommon< Subclass, Key_, Val_, List_ >::begin ( )
inline

Get beginning of an iterator over keys and values of this map.

template<class Subclass, class Key_, class Val_, class List_>
beginResult_const honey::MtMapCommon< Subclass, Key_, Val_, List_ >::begin ( ) const
inline
template<class Subclass, class Key_, class Val_, class List_>
clearResult honey::MtMapCommon< Subclass, Key_, Val_, List_ >::clear ( )
inline

Clear map of all keys.

template<class Subclass, class Key_, class Val_, class List_>
bool honey::MtMapCommon< Subclass, Key_, Val_, List_ >::empty ( ) const
inline

Check if empty.

template<class Subclass, class Key_, class Val_, class List_>
endResult honey::MtMapCommon< Subclass, Key_, Val_, List_ >::end ( )
inline

Get end of an iterator over keys and values of this map.

template<class Subclass, class Key_, class Val_, class List_>
endResult_const honey::MtMapCommon< Subclass, Key_, Val_, List_ >::end ( ) const
inline
template<class Subclass, class Key_, class Val_, class List_>
template<class... Keys>
eraseResult<Keys...> honey::MtMapCommon< Subclass, Key_, Val_, List_ >::erase ( Keys...  ) const
inline

Erase keys from the map.

template<class Subclass, class Key_, class Val_, class List_>
template<class Key >
bool honey::MtMapCommon< Subclass, Key_, Val_, List_ >::hasKey ( Key  ) const
inline

Check if has key.

template<class Subclass, class Key_, class Val_, class List_>
template<class... Pairs>
insertResult_seq<honey::priv::PairSeqGen<Pairs...>, Pairs...>::type honey::MtMapCommon< Subclass, Key_, Val_, List_ >::insert ( Pairs &&...  pairs) const
inline

Insert pairs of the form (key() = value) into the map.

template<class Subclass, class Key_, class Val_, class List_>
template<class Key >
iterResult<Key> honey::MtMapCommon< Subclass, Key_, Val_, List_ >::iter ( Key  )
inline

Get iterator to element by key.

template<class Subclass, class Key_, class Val_, class List_>
template<class Key >
iterResult_const<Key> honey::MtMapCommon< Subclass, Key_, Val_, List_ >::iter ( Key  ) const
inline
template<class Subclass, class Key_, class Val_, class List_>
szt honey::MtMapCommon< Subclass, Key_, Val_, List_ >::size ( ) const
inline

Get size of map.

Friends And Related Function Documentation

template<class Subclass, class Key_, class Val_, class List_>
template<class , class , class , class >
friend class MtMapCommon
friend
template<class Subclass, class Key_, class Val_, class List_>
template<class , class >
friend class MtMapIter
friend
template<class Subclass, class Key_, class Val_, class List_>
ostream& operator<< ( ostream &  os,
const Subclass &  map 
)
friend

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