Engine²
Open-source game engine written in C++.
Loading...
Searching...
No Matches
Physics::Utils::BiMap< TLeft, TRight > Class Template Reference

#include <BiMap.hpp>

Public Member Functions

 BiMap ()=default
 ~BiMap ()=default
 BiMap (const BiMap &)=delete
BiMapoperator= (const BiMap &)=delete
 BiMap (BiMap &&) noexcept=default
BiMapoperator= (BiMap &&) noexcept=default
void Add (const TLeft &left, const TRight &right)
void Remove (const TLeft &left)
void Remove (const TRight &right)
auto Size () const
const TRight & Get (const TLeft &left) const
const TLeft & Get (const TRight &right) const
bool Contains (const TLeft &left) const
bool Contains (const TRight &right) const

Private Attributes

std::unordered_map< TLeft, TRight > _leftToRight
std::unordered_map< TRight, TLeft > _rightToLeft

Constructor & Destructor Documentation

◆ BiMap() [1/3]

template<typename TLeft, typename TRight>
Physics::Utils::BiMap< TLeft, TRight >::BiMap ( )
default

◆ ~BiMap()

template<typename TLeft, typename TRight>
Physics::Utils::BiMap< TLeft, TRight >::~BiMap ( )
default

◆ BiMap() [2/3]

template<typename TLeft, typename TRight>
Physics::Utils::BiMap< TLeft, TRight >::BiMap ( const BiMap< TLeft, TRight > & )
delete

◆ BiMap() [3/3]

template<typename TLeft, typename TRight>
Physics::Utils::BiMap< TLeft, TRight >::BiMap ( BiMap< TLeft, TRight > && )
defaultnoexcept

Member Function Documentation

◆ Add()

template<typename TLeft, typename TRight>
void Physics::Utils::BiMap< TLeft, TRight >::Add ( const TLeft & left,
const TRight & right )
inline

◆ Contains() [1/2]

template<typename TLeft, typename TRight>
bool Physics::Utils::BiMap< TLeft, TRight >::Contains ( const TLeft & left) const
inline

◆ Contains() [2/2]

template<typename TLeft, typename TRight>
bool Physics::Utils::BiMap< TLeft, TRight >::Contains ( const TRight & right) const
inline

◆ Get() [1/2]

template<typename TLeft, typename TRight>
const TRight & Physics::Utils::BiMap< TLeft, TRight >::Get ( const TLeft & left) const
inline

◆ Get() [2/2]

template<typename TLeft, typename TRight>
const TLeft & Physics::Utils::BiMap< TLeft, TRight >::Get ( const TRight & right) const
inline

◆ operator=() [1/2]

template<typename TLeft, typename TRight>
BiMap & Physics::Utils::BiMap< TLeft, TRight >::operator= ( BiMap< TLeft, TRight > && )
defaultnoexcept

◆ operator=() [2/2]

template<typename TLeft, typename TRight>
BiMap & Physics::Utils::BiMap< TLeft, TRight >::operator= ( const BiMap< TLeft, TRight > & )
delete

◆ Remove() [1/2]

template<typename TLeft, typename TRight>
void Physics::Utils::BiMap< TLeft, TRight >::Remove ( const TLeft & left)
inline

◆ Remove() [2/2]

template<typename TLeft, typename TRight>
void Physics::Utils::BiMap< TLeft, TRight >::Remove ( const TRight & right)
inline

◆ Size()

template<typename TLeft, typename TRight>
auto Physics::Utils::BiMap< TLeft, TRight >::Size ( ) const
inline

Member Data Documentation

◆ _leftToRight

template<typename TLeft, typename TRight>
std::unordered_map<TLeft, TRight> Physics::Utils::BiMap< TLeft, TRight >::_leftToRight
private

◆ _rightToLeft

template<typename TLeft, typename TRight>
std::unordered_map<TRight, TLeft> Physics::Utils::BiMap< TLeft, TRight >::_rightToLeft
private

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