This is the documentation for Enlighten.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

template<class, class, class, class>
class Geo::GeoMap

    └>_Alloc

Our implementation of an STL map, with some modifications.

  • The class is defined as NonCopyable (so no copy constructor or assignment operator). Required as you cannot report out-of-memory in these functions.

  • No operator[]. Bit of a shame this, but we cannot have an insert operation that can fail and have the function return a reference.

  • The iterator that insert (of various flavours) returns will be equal to GeoMap::end() if the insert operation fails. It is the user's responsibility to check this before using it.

  • Added a new overload of insert to reduce typing (see below)

  • No changes to allocator policy, just created a simple allocator that passes through GEO_MALLOC and GEO_FREE. Can be switched to Geo::GeoFixedPoolAllocator.

Classes

Name Description
Geo::GeoMap::const_iterator

Iterator for nonmutable GeoMap.

Geo::GeoMap::iterator

Iterator for mutable GeoMap.

Typedefs

Name Description
allocator_type::difference_type _DiffType

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

GeoMap< _Kty, _Ty, _Pr, _Alloc > _Myt

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

GeoPair< const_iterator, const_iterator > _Paircc

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

GeoPair< iterator, bool > _Pairib

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

GeoPair< iterator, iterator > _Pairii

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

allocator_type::pointer _PtrType

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

allocator_type::reference _RefType

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

_Alloc allocator_type

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

allocator_type::const_pointer const_pointer

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

allocator_type::const_reference const_reference

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

std::reverse_iterator< const_iterator > const_reverse_iterator

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

_DiffType difference_type

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

_Pr key_compare

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

_Kty key_type

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

_Ty mapped_type

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

_PtrType pointer

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

_RefType reference

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

std::reverse_iterator< iterator > reverse_iterator

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

allocator_type::size_type size_type

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

GeoPair< const _Kty, _Ty > value_type

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

Friends

Name Description
friend class const_iterator

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

friend class iterator

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

Variables

Name Description
const size_t max_allocation_size = sizeof(_Node)

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

Functions

Name Description
~GeoMap()

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

begin()

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

begin()

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

clear()

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

count(const key_type &)

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

empty()

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

end()

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

end()

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

equal_range(const key_type &)

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

equal_range(const key_type &)

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

erase(const key_type *, const key_type *)

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

erase(const key_type &)

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

erase(const_iterator, const_iterator)

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

erase(const_iterator)

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

find(const key_type &)

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

find(const key_type &)

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

GeoMap()

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

GeoMap(const key_compare &)

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

GeoMap(const allocator_type &)

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

GeoMap(const key_compare &, const allocator_type &)

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

get_allocator()

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

insert(const key_type &, const mapped_type &)

One addition to the STL standard is the addition of an insert(key, value) function.

insert(const value_type &)

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

insert(const_iterator, const value_type &)

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

insert(InputIt, InputIt)

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

key_comp()

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

lower_bound(const key_type &)

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

lower_bound(const key_type &)

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

max_size()

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

rbegin()

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

rbegin()

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

rend()

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

rend()

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

size()

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

swap(_Myt &)

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

upper_bound(const key_type &)

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

upper_bound(const key_type &)

All functions and typedefs match those required by the C++0x standard (except where documented at class level).

value_comp()

All functions and typedefs match those required by the C++0x standard (except where documented at class level).


Geo::GeoMap< _Kty, _Ty, _Pr, _Alloc >::~GeoMap


public: ~GeoMap()


All functions and typedefs match those required by the C++0x standard (except where documented at class level).


iterator Geo::GeoMap< _Kty, _Ty, _Pr, _Alloc >::begin


public: iterator begin()


All functions and typedefs match those required by the C++0x standard (except where documented at class level).


const_iterator Geo::GeoMap< _Kty, _Ty, _Pr, _Alloc >::begin


public: const_iterator begin() const


All functions and typedefs match those required by the C++0x standard (except where documented at class level).


void Geo::GeoMap< _Kty, _Ty, _Pr, _Alloc >::clear


public: void clear()


All functions and typedefs match those required by the C++0x standard (except where documented at class level).


size_type Geo::GeoMap< _Kty, _Ty, _Pr, _Alloc >::count


public: size_type count
(
    const key_type & _Keyval
) const


All functions and typedefs match those required by the C++0x standard (except where documented at class level).


bool Geo::GeoMap< _Kty, _Ty, _Pr, _Alloc >::empty


public: bool empty() const


All functions and typedefs match those required by the C++0x standard (except where documented at class level).


iterator Geo::GeoMap< _Kty, _Ty, _Pr, _Alloc >::end


public: iterator end()


All functions and typedefs match those required by the C++0x standard (except where documented at class level).


const_iterator Geo::GeoMap< _Kty, _Ty, _Pr, _Alloc >::end


public: const_iterator end() const


All functions and typedefs match those required by the C++0x standard (except where documented at class level).


_Pairii Geo::GeoMap< _Kty, _Ty, _Pr, _Alloc >::equal_range


public: _Pairii equal_range
(
    const key_type & _Keyval
)


All functions and typedefs match those required by the C++0x standard (except where documented at class level).


_Paircc Geo::GeoMap< _Kty, _Ty, _Pr, _Alloc >::equal_range


public: _Paircc equal_range
(
    const key_type & _Keyval
) const


All functions and typedefs match those required by the C++0x standard (except where documented at class level).


void Geo::GeoMap< _Kty, _Ty, _Pr, _Alloc >::erase


public: void erase
(
    const key_type * _First,
    const key_type * _Last
)


All functions and typedefs match those required by the C++0x standard (except where documented at class level).


size_type Geo::GeoMap< _Kty, _Ty, _Pr, _Alloc >::erase


public: size_type erase
(
    const key_type & _Keyval
)


All functions and typedefs match those required by the C++0x standard (except where documented at class level).


iterator Geo::GeoMap< _Kty, _Ty, _Pr, _Alloc >::erase


public: iterator erase
(
    const_iterator _First,
    const_iterator _Last
)


All functions and typedefs match those required by the C++0x standard (except where documented at class level).


iterator Geo::GeoMap< _Kty, _Ty, _Pr, _Alloc >::erase


public: iterator erase
(
    const_iterator _Where
)


All functions and typedefs match those required by the C++0x standard (except where documented at class level).


const_iterator Geo::GeoMap< _Kty, _Ty, _Pr, _Alloc >::find


public: const_iterator find
(
    const key_type & _Keyval
) const


All functions and typedefs match those required by the C++0x standard (except where documented at class level).


iterator Geo::GeoMap< _Kty, _Ty, _Pr, _Alloc >::find


public: iterator find
(
    const key_type & _Keyval
)


All functions and typedefs match those required by the C++0x standard (except where documented at class level).


Geo::GeoMap< _Kty, _Ty, _Pr, _Alloc >::GeoMap


public: GeoMap()


All functions and typedefs match those required by the C++0x standard (except where documented at class level).


Geo::GeoMap< _Kty, _Ty, _Pr, _Alloc >::GeoMap


public: GeoMap
(
    const key_compare & _Pred
)


All functions and typedefs match those required by the C++0x standard (except where documented at class level).


Geo::GeoMap< _Kty, _Ty, _Pr, _Alloc >::GeoMap


public: GeoMap
(
    const allocator_type & _Al
)


All functions and typedefs match those required by the C++0x standard (except where documented at class level).


Geo::GeoMap< _Kty, _Ty, _Pr, _Alloc >::GeoMap


public: GeoMap
(
    const key_compare & _Pred,
    const allocator_type & _Al
)


All functions and typedefs match those required by the C++0x standard (except where documented at class level).


allocator_type Geo::GeoMap< _Kty, _Ty, _Pr, _Alloc >::get_allocator


public: allocator_type get_allocator() const


All functions and typedefs match those required by the C++0x standard (except where documented at class level).


_Pairib Geo::GeoMap< _Kty, _Ty, _Pr, _Alloc >::insert


public: _Pairib insert
(
    const key_type & key,
    const mapped_type & val
)


One addition to the STL standard is the addition of an insert(key, value) function.

This would usually be available as operator[], but without exception handling enabled we would have no way to detect a failure in the standard function. Therefore it was considered better to add a new function overload than to change the behaviour of an existing function.


_Pairib Geo::GeoMap< _Kty, _Ty, _Pr, _Alloc >::insert


public: _Pairib insert
(
    const value_type & val
)


All functions and typedefs match those required by the C++0x standard (except where documented at class level).


iterator Geo::GeoMap< _Kty, _Ty, _Pr, _Alloc >::insert


public: iterator insert
(
    const_iterator hint,
    const value_type & val
)


All functions and typedefs match those required by the C++0x standard (except where documented at class level).


bool Geo::GeoMap< _Kty, _Ty, _Pr, _Alloc >::insert


public: bool insert
(
    InputIt first,
    InputIt last
)


All functions and typedefs match those required by the C++0x standard (except where documented at class level).


key_compare Geo::GeoMap< _Kty, _Ty, _Pr, _Alloc >::key_comp


public: key_compare key_comp() const


All functions and typedefs match those required by the C++0x standard (except where documented at class level).


iterator Geo::GeoMap< _Kty, _Ty, _Pr, _Alloc >::lower_bound


public: iterator lower_bound
(
    const key_type & _Keyval
)


All functions and typedefs match those required by the C++0x standard (except where documented at class level).


const_iterator Geo::GeoMap< _Kty, _Ty, _Pr, _Alloc >::lower_bound


public: const_iterator lower_bound
(
    const key_type & _Keyval
) const


All functions and typedefs match those required by the C++0x standard (except where documented at class level).


size_type Geo::GeoMap< _Kty, _Ty, _Pr, _Alloc >::max_size


public: size_type max_size() const


All functions and typedefs match those required by the C++0x standard (except where documented at class level).


const_reverse_iterator Geo::GeoMap< _Kty, _Ty, _Pr, _Alloc >::rbegin


public: const_reverse_iterator rbegin() const


All functions and typedefs match those required by the C++0x standard (except where documented at class level).


reverse_iterator Geo::GeoMap< _Kty, _Ty, _Pr, _Alloc >::rbegin


public: reverse_iterator rbegin()


All functions and typedefs match those required by the C++0x standard (except where documented at class level).


const_reverse_iterator Geo::GeoMap< _Kty, _Ty, _Pr, _Alloc >::rend


public: const_reverse_iterator rend() const


All functions and typedefs match those required by the C++0x standard (except where documented at class level).


reverse_iterator Geo::GeoMap< _Kty, _Ty, _Pr, _Alloc >::rend


public: reverse_iterator rend()


All functions and typedefs match those required by the C++0x standard (except where documented at class level).


size_type Geo::GeoMap< _Kty, _Ty, _Pr, _Alloc >::size


public: size_type size() const


All functions and typedefs match those required by the C++0x standard (except where documented at class level).


void Geo::GeoMap< _Kty, _Ty, _Pr, _Alloc >::swap


public: void swap
(
    _Myt & rhs
)


All functions and typedefs match those required by the C++0x standard (except where documented at class level).


iterator Geo::GeoMap< _Kty, _Ty, _Pr, _Alloc >::upper_bound


public: iterator upper_bound
(
    const key_type & _Keyval
)


All functions and typedefs match those required by the C++0x standard (except where documented at class level).


const_iterator Geo::GeoMap< _Kty, _Ty, _Pr, _Alloc >::upper_bound


public: const_iterator upper_bound
(
    const key_type & _Keyval
) const


All functions and typedefs match those required by the C++0x standard (except where documented at class level).


value_compare Geo::GeoMap< _Kty, _Ty, _Pr, _Alloc >::value_comp


public: value_compare value_comp() const


All functions and typedefs match those required by the C++0x standard (except where documented at class level).

  • No labels