# Frost::s_map< Key, Value > Class Template Reference

Base type : container (sorted associative). More...

`#include <frost_utils_map.h>`

List of all members.

## Public Types

typedef std::map< Key, Value > ::iterator | iterator
typedef std::map< Key, Value > ::const_iterator | const_iterator
typedef s_range< iterator > | range
typedef s_range< const_iterator > | const_range
typedef s_pair< Key, Value > | pair

## Public Member Functions

| s_map ()
| Default constructor.
s_pair< iterator, s_bool > | Insert (const pair &mPair)
| Inserts the provided pair in the map.
void | Erase (const Key &mKey)
| Erases an element from the map.
void | Erase (const iterator &mIter)
| Erases an element from the map.
void | Erase (const iterator &mBegin, const iterator &mEnd)
| Erases a range of elements from the map.
void | Erase (const range &mRange)
| Erases a range of elements from the map.
s_bool | Find (const Key &mKey) const
| Searches the map for the provided key.
s_uint_t< default_uint > | FindPos (const Key &mKey) const
| Searches the map for the provided key.
iterator | Get (const Key &mKey)
| Searches the map for the provided key.
const_iterator | Get (const Key &mKey) const
| Searches the map for the provided key.
iterator | LowerBound (const Key &mKey)
| Returns one of the surrounding pairs.
const_iterator | LowerBound (const Key &mKey) const
| Returns one of the surrounding pairs.
iterator | UpperBound (const Key &mKey)
| Returns one of the surrounding pairs.
const_iterator | UpperBound (const Key &mKey) const
| Returns one of the surrounding pairs.
void | Clear ()
| Removes all elements from this map.
s_uint_t< default_uint > | GetSize () const
| Returns the number of elements in this map.
s_bool | IsEmpty () const
| Checks if this map is empty.
Value & | operator[] (const Key &mKey)
const Value & | operator[] (const Key &mKey) const
s_ctnr< s_map > | operator, (const s_map &lValue)
iterator | Begin ()
const_iterator | Begin () const
iterator | End ()
const_iterator | End () const
iterator | begin ()
const_iterator | begin () const
iterator | end ()
const_iterator | end () const

## Private Attributes

std::map< Key, Value > | mMap_

## Detailed Description

### template<class Key, class Value>
class Frost::s_map< Key, Value >

Base type : container (sorted associative).

This class is basically a wrapper around std::map. It features a few more finding functions and some renamed ones.

Definition at line 11 of file frost_utils_map.h.

## Member Typedef Documentation

template<class Key, class Value>

typedef std::map<Key, Value>::const_iterator Frost::s_map< Key, Value >::const_iterator

Definition at line 16 of file frost_utils_map.h.

template<class Key, class Value>

typedef s_range<const_iterator> Frost::s_map< Key, Value >::const_range

Definition at line 18 of file frost_utils_map.h.

template<class Key, class Value>

typedef std::map<Key, Value>::iterator Frost::s_map< Key, Value >::iterator

Definition at line 15 of file frost_utils_map.h.

template<class Key, class Value>

typedef s_pair<Key, Value> Frost::s_map< Key, Value >::pair

Definition at line 19 of file frost_utils_map.h.

template<class Key, class Value>

typedef s_range<iterator> Frost::s_map< Key, Value >::range

Definition at line 17 of file frost_utils_map.h.

## Constructor & Destructor Documentation

template<class Key, class Value>

Frost::s_map< Key, Value >::s_map | ( |  | ) | `[inline]`

Default constructor.

Definition at line 22 of file frost_utils_map.h.

## Member Function Documentation

template<class Key, class Value>

const_iterator Frost::s_map< Key, Value >::begin | ( |  | ) | const`[inline]`

Definition at line 254 of file frost_utils_map.h.

template<class Key, class Value>

iterator Frost::s_map< Key, Value >::begin | ( |  | ) | `[inline]`

Definition at line 249 of file frost_utils_map.h.

template<class Key, class Value>

const_iterator Frost::s_map< Key, Value >::Begin | ( |  | ) | const`[inline]`

Definition at line 234 of file frost_utils_map.h.

template<class Key, class Value>

iterator Frost::s_map< Key, Value >::Begin | ( |  | ) | `[inline]`

Definition at line 229 of file frost_utils_map.h.

template<class Key, class Value>

void Frost::s_map< Key, Value >::Clear | ( |  | ) | `[inline]`

Removes all elements from this map.

Definition at line 190 of file frost_utils_map.h.

template<class Key, class Value>

const_iterator Frost::s_map< Key, Value >::end | ( |  | ) | const`[inline]`

Definition at line 264 of file frost_utils_map.h.

template<class Key, class Value>

iterator Frost::s_map< Key, Value >::end | ( |  | ) | `[inline]`

Definition at line 259 of file frost_utils_map.h.

template<class Key, class Value>

const_iterator Frost::s_map< Key, Value >::End | ( |  | ) | const`[inline]`

Definition at line 244 of file frost_utils_map.h.

template<class Key, class Value>

iterator Frost::s_map< Key, Value >::End | ( |  | ) | `[inline]`

Definition at line 239 of file frost_utils_map.h.

template<class Key, class Value>

void Frost::s_map< Key, Value >::Erase | ( | const range & | mRange | ) | `[inline]`

Erases a range of elements from the map.

Parameters:

  | mRange | The range to erase

Definition at line 81 of file frost_utils_map.h.

template<class Key, class Value>

void Frost::s_map< Key, Value >::Erase | ( | const iterator & | mBegin,
|  | const iterator & | mEnd |
| ) |  |  | `[inline]`

Erases a range of elements from the map.

Parameters:

  | mBegin | The start of the range
  | mEnd | The ending of the range

Definition at line 73 of file frost_utils_map.h.

template<class Key, class Value>

void Frost::s_map< Key, Value >::Erase | ( | const iterator & | mIter | ) | `[inline]`

Erases an element from the map.

Parameters:

  | mIter | An iterator pointing at the element to erase

Definition at line 64 of file frost_utils_map.h.

template<class Key, class Value>

void Frost::s_map< Key, Value >::Erase | ( | const Key & | mKey | ) | `[inline]`

Erases an element from the map.

Parameters:

  | mKey | The key of the element to erase

Definition at line 56 of file frost_utils_map.h.

template<class Key, class Value>

s_bool Frost::s_map< Key, Value >::Find | ( | const Key & | mKey | ) | const`[inline]`

Searches the map for the provided key.

Parameters:

  | mKey | The key to search for

Returns:
  'true' if the key has been found

Definition at line 90 of file frost_utils_map.h.

template<class Key, class Value>

s_uint_t<default_uint> Frost::s_map< Key, Value >::FindPos | ( | const Key & | mKey | ) | const`[inline]`

Searches the map for the provided key.

Parameters:

  | mKey | The key to search for

Returns:
  The position of the key in the map

Note:
  If the key is not present in the map, this function returns s_uint::NaN.

Definition at line 101 of file frost_utils_map.h.

template<class Key, class Value>

const_iterator Frost::s_map< Key, Value >::Get | ( | const Key & | mKey | ) | const`[inline]`

Searches the map for the provided key.

Parameters:

  | mKey | The key to search for

Returns:
  An iterator pointing to the associated pair

Note:
  If the key is not present in the map, this function returns End().

Definition at line 128 of file frost_utils_map.h.

template<class Key, class Value>

iterator Frost::s_map< Key, Value >::Get | ( | const Key & | mKey | ) | `[inline]`

Searches the map for the provided key.

Parameters:

  | mKey | The key to search for

Returns:
  An iterator pointing to the associated pair

Note:
  If the key is not present in the map, this function returns End().

Definition at line 117 of file frost_utils_map.h.

template<class Key, class Value>

s_uint_t<default_uint> Frost::s_map< Key, Value >::GetSize | ( |  | ) | const`[inline]`

Returns the number of elements in this map.

Returns:
  The number of elements in this map

Definition at line 198 of file frost_utils_map.h.

template<class Key, class Value>

s_pair<iterator, s_bool> Frost::s_map< Key, Value >::Insert | ( | const pair & | mPair | ) | `[inline]`

Inserts the provided pair in the map.

Parameters:

  | mPair | The pair to insert

Returns:
  An iterator pointing at the inserted value, and a bool that equals 'true' if no element with the same key was present in the map.

Note:
  If the provided key is already present in the map, the value is not inserted.

Definition at line 47 of file frost_utils_map.h.

template<class Key, class Value>

s_bool Frost::s_map< Key, Value >::IsEmpty | ( |  | ) | const`[inline]`

Checks if this map is empty.

Returns:
  'true' if this map is empty

Definition at line 206 of file frost_utils_map.h.

template<class Key, class Value>

const_iterator Frost::s_map< Key, Value >::LowerBound | ( | const Key & | mKey | ) | const`[inline]`

Returns one of the surrounding pairs.

Parameters:

  | mKey | The key to search for

Returns:
  An iterator pointing to one of the surrounding pairs

Note:
  You are searching for mKey, but it's proably not in this map. But there are two keys in the map that surround mKey : mLower and mUpper.
  This function will always return mUpper, unless mKey equals mLower : it will then return mLower.

Definition at line 156 of file frost_utils_map.h.

template<class Key, class Value>

iterator Frost::s_map< Key, Value >::LowerBound | ( | const Key & | mKey | ) | `[inline]`

Returns one of the surrounding pairs.

Parameters:

  | mKey | The key to search for

Returns:
  An iterator pointing to one of the surrounding pairs

Note:
  You are searching for mKey, but it's proably not in this map. But there are two keys in the map that surround mKey : mLower and mUpper.
  This function will always return mUpper, unless mKey equals mLower : it will then return mLower.

Definition at line 142 of file frost_utils_map.h.

template<class Key, class Value>

s_ctnr<s_map> Frost::s_map< Key, Value >::operator, | ( | const s_map< Key, Value > & | lValue | ) | `[inline]`

Definition at line 221 of file frost_utils_map.h.

template<class Key, class Value>

const Value& Frost::s_map< Key, Value >::operator[] | ( | const Key & | mKey | ) | const`[inline]`

Definition at line 216 of file frost_utils_map.h.

template<class Key, class Value>

Value& Frost::s_map< Key, Value >::operator[] | ( | const Key & | mKey | ) | `[inline]`

Definition at line 211 of file frost_utils_map.h.

template<class Key, class Value>

const_iterator Frost::s_map< Key, Value >::UpperBound | ( | const Key & | mKey | ) | const`[inline]`

Returns one of the surrounding pairs.

Parameters:

  | mKey | The key to search for

Returns:
  An iterator pointing to one of the surrounding pairs

Note:
  You are searching for mKey, but it's proably not in this map. But there are two keys in the map that surround mKey : mLower and mUpper.
  This function will always return mUpper, unless mKey equals mUpper : it will then return mUpper+1.

Definition at line 184 of file frost_utils_map.h.

template<class Key, class Value>

iterator Frost::s_map< Key, Value >::UpperBound | ( | const Key & | mKey | ) | `[inline]`

Returns one of the surrounding pairs.

Parameters:

  | mKey | The key to search for

Returns:
  An iterator pointing to one of the surrounding pairs

Note:
  You are searching for mKey, but it's proably not in this map. But there are two keys in the map that surround mKey : mLower and mUpper.
  This function will always return mUpper, unless mKey equals mUpper : it will then return mUpper+1.

Definition at line 170 of file frost_utils_map.h.

## Member Data Documentation

template<class Key, class Value>

std::map<Key, Value> Frost::s_map< Key, Value >::mMap_`[private]`

Definition at line 271 of file frost_utils_map.h.

The documentation for this class was generated from the following file:

- D:/Programmation/Sources/Tensor2/Utils/include/frost_utils_map.h