Honeycomb
0.1
Component-Model Framework
|
Map element in recursive list. More...
#include <MtMap.h>
Public Types | |
template<class Key > | |
using | hasKey_ = typename Super::template hasKey_< Key > |
template<class Key > | |
using | getResult = typename Super::template getResult< Key > |
template<class Key > | |
using | iterResult = typename Super::template iterResult< Key > |
template<class Key > | |
using | iterResult_const = typename Super::template iterResult_const< Key > |
template<class... Pairs> | |
using | insertResult = typename Super::template insertResult< Pairs... > |
template<class... Keys> | |
using | eraseResult = typename Super::template eraseResult< Keys... > |
typedef Key_ | Key |
Key type. More... | |
typedef Val_ | Val |
Value type. More... | |
typedef List_ | List |
Rest of map. More... | |
typedef MtMapIter< Subclass > | beginResult |
Result type of begin() More... | |
typedef MtMapIter< const Subclass > | beginResult_const |
typedef MtMapIter< Subclass, MtMapTail > | endResult |
Result type of end() More... | |
typedef MtMapIter< const Subclass, MtMapTail > | endResult_const |
typedef clearResult_::type | clearResult |
Result type of clear() More... | |
Public Types inherited from honey::MtMapCommon< MtMapElem< Key_, Val_, List_ >, Key_, Val_, List_ > | |
typedef Key_ | Key |
Key type. More... | |
typedef Val_ | Val |
Value type. More... | |
typedef List_ | List |
Rest of map. More... | |
using | getResult = typename findElem< Key >::type::Val |
Result type of get() More... | |
typedef MtMapIter< MtMapElem< Key_, Val_, List_ > > | beginResult |
Result type of begin() More... | |
typedef MtMapIter< const MtMapElem< Key_, Val_, List_ > > | beginResult_const |
typedef MtMapIter< MtMapElem< Key_, Val_, List_ >, MtMapTail > | endResult |
Result type of end() More... | |
typedef MtMapIter< const MtMapElem< Key_, Val_, List_ >, MtMapTail > | endResult_const |
using | iterResult = MtMapIter< MtMapElem< Key_, Val_, List_ >, typename findElem< Key >::type > |
Result type of iter() More... | |
using | iterResult_const = MtMapIter< const MtMapElem< Key_, Val_, List_ >, typename findElem< Key >::type > |
using | insertResult = typename insertResult_< Pairs... >::type |
Result type of insert(). New pairs are inserted at the front. More... | |
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 | |
MtMapElem () | |
template<class Pair , class... Pairs> | |
MtMapElem (mt::tag< 0 >, Pair &&pair, Pairs &&...pairs) | |
Ctor, pairs must be in correct order. More... | |
template<class Map > | |
MtMapElem (Map &&map) | |
Copy/Move any map type. Init with matching key in other map, recurse to tail. More... | |
template<class Map > | |
MtMapElem & | operator= (Map &&rhs) |
Copy/Move-assign any map type. Assign to matching key in other map, recurse to tail. More... | |
const Val & | operator[] (Key) const |
Get value at key. More... | |
Val & | operator[] (Key) |
const Val & | get (Key) const |
Get value at key. More... | |
Val & | get (Key) |
template<class Val > | |
bool | set (MtPair< Key, Val > &&pair) |
Set value at key from the pair (key() = value) . Returns false if the key isn't found. More... | |
template<class Map > | |
void | setDefaults (Map &&defaults) |
Set any uninitialized optional values to the defaults provided. A default for a key must be a functor that returns the value, so that the value ctor can be omitted if the key is already set. More... | |
Public Member Functions inherited from honey::MtMapCommon< MtMapElem< Key_, Val_, List_ >, Key_, Val_, List_ > | |
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 |
iterResult< Key > | iter (Key) |
Get iterator to element by key. More... | |
iterResult_const< Key > | iter (Key) const |
insertResult_seq< honey::priv::PairSeqGen< Pairs... >, Pairs... >::type | insert (Pairs &&...pairs) const |
Insert pairs of the form (key() = value) into the map. More... | |
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 > | |
class | MtMapElem |
template<class , class > | |
class | MtMapIter |
Map element in recursive list.
typedef MtMapIter<Subclass> honey::MtMapCommon< Subclass, Key_, Val_, List_ >::beginResult |
Result type of begin()
typedef MtMapIter<const Subclass> honey::MtMapCommon< Subclass, Key_, Val_, List_ >::beginResult_const |
typedef clearResult_ ::type honey::MtMapCommon< Subclass, Key_, Val_, List_ >::clearResult |
Result type of clear()
typedef MtMapIter<Subclass, MtMapTail> honey::MtMapCommon< Subclass, Key_, Val_, List_ >::endResult |
Result type of end()
typedef MtMapIter<const Subclass, MtMapTail> honey::MtMapCommon< Subclass, Key_, Val_, List_ >::endResult_const |
using honey::MtMapElem< Key_, Val_, List_ >::eraseResult = typename Super::template eraseResult<Keys...> |
using honey::MtMapElem< Key_, Val_, List_ >::getResult = typename Super::template getResult<Key> |
using honey::MtMapElem< Key_, Val_, List_ >::hasKey_ = typename Super::template hasKey_<Key> |
using honey::MtMapElem< Key_, Val_, List_ >::insertResult = typename Super::template insertResult<Pairs...> |
using honey::MtMapElem< Key_, Val_, List_ >::iterResult = typename Super::template iterResult<Key> |
using honey::MtMapElem< Key_, Val_, List_ >::iterResult_const = typename Super::template iterResult_const<Key> |
typedef Key_ honey::MtMapCommon< Subclass, Key_, Val_, List_ >::Key |
Key type.
typedef List_ honey::MtMapCommon< Subclass, Key_, Val_, List_ >::List |
Rest of map.
typedef Val_ honey::MtMapCommon< Subclass, Key_, Val_, List_ >::Val |
Value type.
|
inline |
|
inline |
Ctor, pairs must be in correct order.
|
inline |
Copy/Move any map type. Init with matching key in other map, recurse to tail.
|
inline |
Get value at key.
|
inline |
|
inline |
Copy/Move-assign any map type. Assign to matching key in other map, recurse to tail.
|
inline |
Get value at key.
|
inline |
|
inline |
Set value at key from the pair (key() = value)
. Returns false if the key isn't found.
|
inline |
Set any uninitialized optional values to the defaults provided. A default for a key must be a functor that returns the value, so that the value ctor can be omitted if the key is already set.
|
friend |
|
friend |
|
friend |