MVault 1.0.0
Simple c++ database
Loading...
Searching...
No Matches
Public Member Functions | List of all members
mvlt::Map< KeyType, ValueType > Class Template Reference

The descendant of the ParentMap class, which stores the map, i.e. the binary tree. More...

#include <Map.h>

Inheritance diagram for mvlt::Map< KeyType, ValueType >:
Inheritance graph
[legend]
Collaboration diagram for mvlt::Map< KeyType, ValueType >:
Collaboration graph
[legend]

Public Member Functions

 Map (const bool &isMultiMap) noexcept
 Class constructor.
 
MapIterator< KeyType, ValueTypeLowerBound (const KeyType &data) noexcept
 Returns an iterator pointing to the first element that is not less than (i.e. greater or equal to) data.
 
MapIterator< KeyType, ValueTypeUpperBound (const KeyType &data) noexcept
 Returns an iterator pointing to the first element that is greater than key.
 
ReverseMapIterator< KeyType, ValueTypeRbegin () noexcept
 Reverse begin container method.
 
ReverseMapIterator< KeyType, ValueTypeRend () noexcept
 Reverse end container method.
 
- Public Member Functions inherited from mvlt::ParentMap< std::multimap< KeyType, ValueType >, std::map< KeyType, ValueType >, MapIterator< KeyType, ValueType >, KeyType, ValueType >
MapIterator< KeyType, ValueTypebegin () noexcept
 Begin container method.
 
MapIterator< KeyType, ValueTypeend () noexcept
 End container method.
 
MapIterator< KeyType, ValueTypeBegin () noexcept
 Begin container method.
 
MapIterator< KeyType, ValueTypeEnd () noexcept
 End container method.
 
bool IsMultiContainer () const noexcept
 The method to check if it is multi container.
 
std::pair< MapIterator< KeyType, ValueType >, boolEmplace (EmplaceKeyType &&key, EmplaceValueType &&value) noexcept
 The method for inserting data into the Map.
 
std::pair< MapIterator< KeyType, ValueType >, MapIterator< KeyType, ValueType > > EqualRange (const KeyType &data) noexcept
 The method for getting range of data.
 
MapIterator< KeyType, ValueTypeFind (const KeyType &data) noexcept
 The method for getting iterator with key.
 
std::size_t Erase (const KeyType &data) noexcept
 The method for erase data from Map with key.
 
MapIterator< KeyType, ValueTypeErase (const MapIterator< KeyType, ValueType > &dataIt) noexcept
 The method for erase data from Map with iterator.
 
void Clear () noexcept
 The method for clear Map.
 
std::size_t Size () noexcept
 The method for get Map size.
 

Additional Inherited Members

- Protected Attributes inherited from mvlt::ParentMap< std::multimap< KeyType, ValueType >, std::map< KeyType, ValueType >, MapIterator< KeyType, ValueType >, KeyType, ValueType >
bool IsMultiMap
 Is this multi map.
 
std::multimap< KeyType, ValueTypeDataMultiMap
 Multi container.
 
std::map< KeyType, ValueTypeDataMap
 Container.
 

Detailed Description

template<class KeyType, class ValueType>
class mvlt::Map< KeyType, ValueType >

The descendant of the ParentMap class, which stores the map, i.e. the binary tree.

Constructor & Destructor Documentation

◆ Map()

template<class KeyType , class ValueType >
mvlt::Map< KeyType, ValueType >::Map ( const bool isMultiMap)
inlineexplicitnoexcept

Class constructor.

Parameters
[in]isMultiMapis this UnorderedMap store data in std::multimap

Member Function Documentation

◆ LowerBound()

template<class KeyType , class ValueType >
MapIterator< KeyType, ValueType > mvlt::Map< KeyType, ValueType >::LowerBound ( const KeyType data)
inlinenoexcept

Returns an iterator pointing to the first element that is not less than (i.e. greater or equal to) data.

Parameters
[in]datalower bound
Returns
Iterator pointing to the first element that is not less than key. If no such element is found, a End() is returned.

◆ Rbegin()

template<class KeyType , class ValueType >
ReverseMapIterator< KeyType, ValueType > mvlt::Map< KeyType, ValueType >::Rbegin ( )
inlinenoexcept

Reverse begin container method.

Returns
Last map container iterator

◆ Rend()

template<class KeyType , class ValueType >
ReverseMapIterator< KeyType, ValueType > mvlt::Map< KeyType, ValueType >::Rend ( )
inlinenoexcept

Reverse end container method.

Returns
First map container iterator

◆ UpperBound()

template<class KeyType , class ValueType >
MapIterator< KeyType, ValueType > mvlt::Map< KeyType, ValueType >::UpperBound ( const KeyType data)
inlinenoexcept

Returns an iterator pointing to the first element that is greater than key.

Parameters
[in]datalower bound
Returns
Iterator pointing to the first element that is greater than key. If no such element is found, End() iterator is returned.

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