- Append
- Prepend
- Undefined
- ListMapRepVersion = 1
Creates a map with a particular default value
+grp
-grp
These functions check to see if a mapping is defined between the specified key and some value. If one is, a pointer to the value is returned, otherwise 0 is returned.
+grp
Returns the number of user defined mappings
Defines a mapping (ie. create a key value mapping)
Undefines a mapping (ie. remove a key value mapping).
Clear all of the mappings.
Set/Get the insertion order
+grp
-grp
- Append
- Prepend
- Undefined
- ListMapVersion = 1
This is one possible implementation of the Map class. It uses
a linked list to implement an associative array. Other likely
implementations are hashed, and binary tree. It can be used
as follows:
Creates a map with a particular default value
+grp
-grp
Creates a ListMap from an existing one (copy semantics).
Assigns one list map to another (copy semantics).
Set/Get the insertion order
+grp
-grp
This is the "letter" which when paired (Const)MapIter "envelope"
allows traversal of "ListMap"s.
Checks to see if the iterator is in a valid state.
Checks to see if the iterator is at one of the
map extremes, "atEnd()" or "atStart()".
+grp
-grp
Move the iterator to the beginning of the Map.
Advance the iterator to the next key.
+grp
Retrieve the key at the current iterator position.
Retrieve the value at the current iterator position.
+grp
-grp
These constructors allow a ListMapIter to be constructed from a
ListMap.
+grp
-grp
Review Status
ListMap
Member Description
ListIter<OrderedPair<key,value> > &list()
enum DefineOrder
explicit ListMap(const value &dflt) : Map<key,value>(new ListMapRep<key,value>(dflt))
ListMap(const value &dflt, dflt InOrder) : Map<key,value>(new ListMapRep<key,value>(dflt, InOrder == Append ? ListMapRep<key,value>::Append : InOrder == Prepend ? ListMapRep<key,value>::Prepend : ListMapRep<key,value>::Undefined))
ListMap(const ListMap<key,value> &other) : Map<key,value>(other.Rep->Clone())
ListMap<key,value> &operator=(const ListMap<key,value>&other)
DefineOrder getOrder() const
void setOrder(DefineOrder OR)
enum
template<class key, class value> class ListMapIterRep : virtual public MapIterRep<key,value>
Types
enum
Interface
Description
Review Status
Member Description
Bool isValid() const
Bool atEnd() const
Bool atStart() const
void toStart()
void operator++()
void operator++(int)
const key &getKey() const
-grp
const value &getVal() const
value &getVal()
MapIterRep<key,value> *Clone()
ListMapIterRep(ListMap<key,value> *st) : MapIterRep<key,value>(st), listp(st->list())
ListMapIterRep(ListMap<key,value> &st) : MapIterRep<key,value>(st), listp(st.list())
enum