Module: map
Concept macro for a map. Apart from the Map
macro and concept macro,
the documentation in this module is for a generated set instance
mapping from type Tk
to type Tv
.
All of the functions that take Iterator
arguments are defined for
ReverseIterator
s as well, notwithstanding that there is no
documentation for those instances.
The Map
type implements the following concepts:
PairAssociativeContainer
;SortedAssociativeContainer
; andUniqueAssociativeContainer
.
Its iterators implement ForwardIterator
.
Linkage: extern
Members: N/A
The core map structure type.
Linkage: extern
Members: N/A
Linkage: extern
Members:
(mapp (p (Map Tk Tv)))
(setiter (ReverseIterator (Set (value-type (nullptr (Map Tk Tv))))))
Linkage: extern
Returns: bool
Parameters:
(mapp (ref (Map Tk Tv)))
: A map reference.
Initialise a map.
Linkage: extern
Returns: size
Parameters:
(mapp (ref (Map Tk Tv)))
: A map reference.
Return the number of elements in the map.
Linkage: extern
Returns: size
Parameters:
(mapp (ref (const (Map Tk Tv))))
: A map reference.
Returns the number of elements that can be accommodated by the map.
Linkage: extern
Returns: bool
Parameters:
(mapp (ref (const (Map Tk Tv))))
: A map reference.
Determine whether the map is empty.
Linkage: extern
Returns: (Iterator (Map Tk Tv))
Parameters:
(mapp (ref (Map Tk Tv)))
: A map reference.
Returns the iterator representing the end of the map (sentinel).
Linkage: extern
Returns: (Iterator (Map Tk Tv))
Parameters:
(mapp (ref (Map Tk Tv)))
: A map reference.
Returns the iterator for the first map element.
Linkage: extern
Returns: (p (value-type (nullptr (Map Tk Tv))))
Parameters:
(iter (Iterator (Map Tk Tv)))
: An iterator.
Returns a pointer to the iterator's value.
Linkage: extern
Returns: (Iterator (Map Tk Tv))
Parameters:
(iter (Iterator (Map Tk Tv)))
: An iterator.
Returns the iterator for the position that follows the argument iterator.
Linkage: extern
Returns: bool
Parameters:
(a (Iterator (Map Tk Tv)))
: The first iterator.(b (Iterator (Map Tk Tv)))
: The second iterator.
Linkage: extern
Returns: bool
Parameters:
(a (Iterator (Map Tk Tv)))
: The first iterator.(b (Iterator (Map Tk Tv)))
: The second iterator.
Linkage: extern
Returns: (ReverseIterator (Map Tk Tv))
Parameters:
(mapp (ref (Map Tk Tv)))
: A map reference.
Returns the iterator representing the beginning of the map (sentinel).
Linkage: extern
Returns: (ReverseIterator (Map Tk Tv))
Parameters:
(mapp (ref (Map Tk Tv)))
: A map reference.
Returns the iterator for the last map element.
Linkage: extern
Returns: void
Parameters:
(mapp (ref (Map Tk Tv)))
: The map reference.
Remove all of the elements from the map.
Linkage: extern
Returns: bool
Parameters:
(mapp (ref (Map Tk Tv)))
: A map reference.(valt (value-type (nullptr (Map Tk Tv))))
: The value to insert into the map.
Insert a new element into the map.
Linkage: extern
Returns: bool
Parameters:
(mapp (ref (Map Tk Tv)))
: A map reference.(key Tk)
: The key for the new map element.(value Tv)
: The value for the new map element.
Insert a new element into the map.
Linkage: extern
Returns: (Iterator (Map Tk Tv))
Parameters:
(mapp (ref (Map Tk Tv)))
: A map reference.(key Tk)
: The value to find in the set.
Find an element within the map, and return the iterator for its position.
Linkage: extern
Returns: bool
Parameters:
(iter (Iterator (Map Tk Tv)))
: The iterator.
Erase an element from the map, by specifying the iterator for its position.
Linkage: extern
Returns: bool
Parameters:
(mapp (ref (Map Tk Tv)))
: A map reference.(key Tk)
: The value to remove from the set.
Erase an element from the map by value.
Linkage: extern
Returns: size
Parameters:
(mapp (ref (Map Tk Tv)))
: A map reference.(key Tk)
: The value for which the count should be determined.
Return the number of times that the value appears in the map. For
a UniqueAssociativeContainer
such as Map
, this can only return
1 or 0, depending on whether the element is present in the set.
Linkage: extern
Returns: (Iterator (Map Tk Tv))
Parameters:
(mapp (ref (Map Tk Tv)))
: A map reference.(key Tk)
: The value for which the lower bound should be found.
Find the lower bound for a given value.
Linkage: extern
Returns: (Iterator (Map Tk Tv))
Parameters:
(mapp (ref (Map Tk Tv)))
: A map reference.(key Tk)
: The value for which the upper bound should be found.
Find the upper bound for a given value.
Linkage: extern
Parameters:
(Tk EqualityComparable)
: The key type node.(Tv Type)
: The value type node.
Expands to a Set
definition over the relevant type. Note that Tk
must also implement LessThanComparable
.
Linkage: extern
Parameters:
Tk
: The key type node.Tv
: The value type node.
Expands to the concrete type name of the Map
generated by way of
the concept macro.
Linkage: extern
Parameters:
(mapp (p (Map Tk Tv)))
: A type node.
Expands to the underlying key type of the map (i.e. Tk
). This
only uses the type node for dispatch purposes, so it's safe to
call this with e.g. (nullptr (Map Tk Tv))
as the argument.
Linkage: extern
Parameters:
(mapp (p (Map Tk Tv)))
: A type node.
Expands to the underlying data type (i.e. Tv
) of the map.
Linkage: extern
Parameters:
(mapp (p (Map Tk Tv)))
: A type node.
Expands to the underlying value type of the set. Note that for
maps, the value type is a specially-constructed pair type that is
not otherwise accessible. However, it is guaranteed to be a struct
that has the members first
and second
, with those members
mapping to Tk
and Tv
respectively.
Linkage: extern
Parameters:
(mapp (p (Map Tk Tv)))
: A type node.
Expands to the underlying size type of the map.
Linkage: extern
Parameters:
(mapp (p (Map Tk Tv)))
: A type node.
Expands to the underlying iterator difference type of the map.
Linkage: extern
Parameters:
(mapiter (p (Iterator (Map Tk Tv))))
: A type node.
Expands to the underlying value type of the iterator. This is the
same as that of value-type
for the container.