Function
mapValue
Subscript operator [ ] of maps.
MapValue mapValue(map, key)
Include Headers
seqan/map.h
Parameters

map | A map. Types: Map
key | A key. Metafunctions: Key

Remarks
Usually, value implements the subscript operator [ ], but for maps, this operator is implemented in mapValue. The semantic of this operator depends on the kind of map: If the map has a cargo, than mapValue(map, key) returns the cargo of the (first) value in the map of the given key. If the map has no cargo, than the function returns a true, if key is in map, or false otherwise.
You may overload key and cargo for your own value type in order to define, what part of your value type is used as key and what as cargo.
Note: There is no way to create a set of Pair, since it is always interpreted as a key/value pair. If you need a key type that holds two members, define your own key type.
Return Values
If map is a set: The same as hasKey(map, key).
If map is a dictionary: The same as value(map, key).
Metafunctions: MapValue
See Also
cargo, hasKey, value
SeqAn - Sequence Analysis Library - www.seqan.de

Page built @2012/03/14 16:34:48