BioDynaMo  v1.05.120-25dc9790
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
bdm::UnorderedFlatmap< TKey, TValue > Class Template Reference

#include <flatmap.h>

Collaboration diagram for bdm::UnorderedFlatmap< TKey, TValue >:
[legend]

Public Types

using value_type = TValue
 
using Pair = std::pair< TKey, TValue >
 
using Iterator = Pair *
 
using ConstIterator = const Pair *
 

Public Member Functions

 UnorderedFlatmap ()=default
 
void reserve (uint64_t new_capacity)
 
size_t size () const
 
size_t Capacity () const
 
void clear ()
 
const TValue & at (const TKey &key) const
 
void insert (Pair &&pair)
 
TValue & operator[] (const TKey &key)
 
const TValue & operator[] (const TKey &key) const
 
Iterator find (const TKey &key)
 
ConstIterator find (const TKey &key) const
 
Iterator begin ()
 
ConstIterator begin () const
 
Iterator end ()
 
ConstIterator end () const
 

Private Member Functions

uint64_t FindIndex (const TKey &key)
 
uint64_t FindIndexConst (const TKey &key) const
 

Private Attributes

std::vector< Pairdata_
 
std::size_t size_ = 0
 

Detailed Description

template<typename TKey, typename TValue>
class bdm::UnorderedFlatmap< TKey, TValue >

Definition at line 28 of file flatmap.h.

Member Typedef Documentation

◆ ConstIterator

template<typename TKey , typename TValue >
using bdm::UnorderedFlatmap< TKey, TValue >::ConstIterator = const Pair*

Definition at line 33 of file flatmap.h.

◆ Iterator

template<typename TKey , typename TValue >
using bdm::UnorderedFlatmap< TKey, TValue >::Iterator = Pair*

Definition at line 32 of file flatmap.h.

◆ Pair

template<typename TKey , typename TValue >
using bdm::UnorderedFlatmap< TKey, TValue >::Pair = std::pair<TKey, TValue>

Definition at line 31 of file flatmap.h.

◆ value_type

template<typename TKey , typename TValue >
using bdm::UnorderedFlatmap< TKey, TValue >::value_type = TValue

Definition at line 30 of file flatmap.h.

Constructor & Destructor Documentation

◆ UnorderedFlatmap()

template<typename TKey , typename TValue >
bdm::UnorderedFlatmap< TKey, TValue >::UnorderedFlatmap ( )
default

Member Function Documentation

◆ at()

template<typename TKey , typename TValue >
const TValue& bdm::UnorderedFlatmap< TKey, TValue >::at ( const TKey &  key) const
inline

Definition at line 49 of file flatmap.h.

◆ begin() [1/2]

template<typename TKey , typename TValue >
Iterator bdm::UnorderedFlatmap< TKey, TValue >::begin ( )
inline

Definition at line 75 of file flatmap.h.

◆ begin() [2/2]

template<typename TKey , typename TValue >
ConstIterator bdm::UnorderedFlatmap< TKey, TValue >::begin ( ) const
inline

Definition at line 76 of file flatmap.h.

◆ Capacity()

template<typename TKey , typename TValue >
size_t bdm::UnorderedFlatmap< TKey, TValue >::Capacity ( ) const
inline

Definition at line 45 of file flatmap.h.

◆ clear()

template<typename TKey , typename TValue >
void bdm::UnorderedFlatmap< TKey, TValue >::clear ( )
inline

Definition at line 47 of file flatmap.h.

◆ end() [1/2]

template<typename TKey , typename TValue >
Iterator bdm::UnorderedFlatmap< TKey, TValue >::end ( )
inline

Definition at line 77 of file flatmap.h.

◆ end() [2/2]

template<typename TKey , typename TValue >
ConstIterator bdm::UnorderedFlatmap< TKey, TValue >::end ( ) const
inline

Definition at line 78 of file flatmap.h.

◆ find() [1/2]

template<typename TKey , typename TValue >
Iterator bdm::UnorderedFlatmap< TKey, TValue >::find ( const TKey &  key)
inline

Definition at line 69 of file flatmap.h.

◆ find() [2/2]

template<typename TKey , typename TValue >
ConstIterator bdm::UnorderedFlatmap< TKey, TValue >::find ( const TKey &  key) const
inline

Definition at line 71 of file flatmap.h.

◆ FindIndex()

template<typename TKey , typename TValue >
uint64_t bdm::UnorderedFlatmap< TKey, TValue >::FindIndex ( const TKey &  key)
inlineprivate

Definition at line 84 of file flatmap.h.

◆ FindIndexConst()

template<typename TKey , typename TValue >
uint64_t bdm::UnorderedFlatmap< TKey, TValue >::FindIndexConst ( const TKey &  key) const
inlineprivate

Definition at line 98 of file flatmap.h.

◆ insert()

template<typename TKey , typename TValue >
void bdm::UnorderedFlatmap< TKey, TValue >::insert ( Pair &&  pair)
inline

Definition at line 56 of file flatmap.h.

◆ operator[]() [1/2]

template<typename TKey , typename TValue >
TValue& bdm::UnorderedFlatmap< TKey, TValue >::operator[] ( const TKey &  key)
inline

Definition at line 63 of file flatmap.h.

◆ operator[]() [2/2]

template<typename TKey , typename TValue >
const TValue& bdm::UnorderedFlatmap< TKey, TValue >::operator[] ( const TKey &  key) const
inline

Definition at line 65 of file flatmap.h.

◆ reserve()

template<typename TKey , typename TValue >
void bdm::UnorderedFlatmap< TKey, TValue >::reserve ( uint64_t  new_capacity)
inline

Definition at line 37 of file flatmap.h.

◆ size()

template<typename TKey , typename TValue >
size_t bdm::UnorderedFlatmap< TKey, TValue >::size ( ) const
inline

Definition at line 43 of file flatmap.h.

Member Data Documentation

◆ data_

template<typename TKey , typename TValue >
std::vector<Pair> bdm::UnorderedFlatmap< TKey, TValue >::data_
private

Definition at line 81 of file flatmap.h.

◆ size_

template<typename TKey , typename TValue >
std::size_t bdm::UnorderedFlatmap< TKey, TValue >::size_ = 0
private

Definition at line 82 of file flatmap.h.


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