Sese Framework  x.y.z
A cross-platform framework
载入中...
搜索中...
未找到
sese::Bimap< K, V > 模板类 参考final

双向映射表 更多...

#include <Bimap.h>

Public 类型

using BimapKeyType = K
 
using BimapValueType = V
 

Public 成员函数

 Bimap ()=default
 
 ~Bimap ()=default
 
 Bimap (const Bimap &)=default
 
Bimapoperator= (const Bimap &)=default
 
 Bimap (Bimap &&) noexcept=default
 
Bimapoperator= (Bimap &&) noexcept=default
 
 Bimap (const std::initializer_list< std::pair< BimapKeyType, BimapValueType > > &init)
 
decltype(auto) begin () const
 
decltype(auto) end () const
 
void insert (const BimapKeyType &key, const BimapValueType &value)
 
void eraseByKey (const BimapKeyType &key)
 
void eraseByValue (const BimapValueType &value)
 
bool tryEraseByKey (const BimapKeyType &key)
 
bool tryEraseByValue (const BimapValueType &value)
 
bool existByKey (const BimapKeyType &key) const
 
bool existByValue (const BimapValueType &value) const
 
const BimapValueTypegetByKey (const BimapKeyType &key) const
 
BimapValueTypegetByKey (const BimapKeyType &key)
 
const BimapKeyTypegetByValue (const BimapValueType &value) const
 
BimapKeyTypegetByValue (const BimapValueType &value)
 
bool empty () const
 
size_t size () const
 
void clear ()
 

Private 属性

std::map< BimapKeyType, BimapValueTypefirst {}
 
std::map< BimapValueType, BimapKeyTypesecond {}
 

详细描述

template<class K, class V>
class sese::Bimap< K, V >

双向映射表

模板参数
K键类型
V值类型

成员类型定义说明

◆ BimapKeyType

template<class K , class V >
using sese::Bimap< K, V >::BimapKeyType = K

◆ BimapValueType

template<class K , class V >
using sese::Bimap< K, V >::BimapValueType = V

构造及析构函数说明

◆ Bimap() [1/4]

template<class K , class V >
sese::Bimap< K, V >::Bimap ( )
default

◆ ~Bimap()

template<class K , class V >
sese::Bimap< K, V >::~Bimap ( )
default

◆ Bimap() [2/4]

template<class K , class V >
sese::Bimap< K, V >::Bimap ( const Bimap< K, V > & )
default

◆ Bimap() [3/4]

template<class K , class V >
sese::Bimap< K, V >::Bimap ( Bimap< K, V > && )
defaultnoexcept

◆ Bimap() [4/4]

template<class K , class V >
sese::Bimap< K, V >::Bimap ( const std::initializer_list< std::pair< BimapKeyType, BimapValueType > > & init)
inline

成员函数说明

◆ begin()

template<class K , class V >
decltype(auto) sese::Bimap< K, V >::begin ( ) const
inline

◆ clear()

template<class K , class V >
void sese::Bimap< K, V >::clear ( )
inline

◆ empty()

template<class K , class V >
bool sese::Bimap< K, V >::empty ( ) const
inlinenodiscard

◆ end()

template<class K , class V >
decltype(auto) sese::Bimap< K, V >::end ( ) const
inline

◆ eraseByKey()

template<class K , class V >
void sese::Bimap< K, V >::eraseByKey ( const BimapKeyType & key)
inline

◆ eraseByValue()

template<class K , class V >
void sese::Bimap< K, V >::eraseByValue ( const BimapValueType & value)
inline

◆ existByKey()

template<class K , class V >
bool sese::Bimap< K, V >::existByKey ( const BimapKeyType & key) const
inline

◆ existByValue()

template<class K , class V >
bool sese::Bimap< K, V >::existByValue ( const BimapValueType & value) const
inline

◆ getByKey() [1/2]

template<class K , class V >
BimapValueType & sese::Bimap< K, V >::getByKey ( const BimapKeyType & key)
inlinenodiscard

◆ getByKey() [2/2]

template<class K , class V >
const BimapValueType & sese::Bimap< K, V >::getByKey ( const BimapKeyType & key) const
inlinenodiscard

◆ getByValue() [1/2]

template<class K , class V >
BimapKeyType & sese::Bimap< K, V >::getByValue ( const BimapValueType & value)
inlinenodiscard

◆ getByValue() [2/2]

template<class K , class V >
const BimapKeyType & sese::Bimap< K, V >::getByValue ( const BimapValueType & value) const
inlinenodiscard

◆ insert()

template<class K , class V >
void sese::Bimap< K, V >::insert ( const BimapKeyType & key,
const BimapValueType & value )
inline

◆ operator=() [1/2]

template<class K , class V >
Bimap & sese::Bimap< K, V >::operator= ( Bimap< K, V > && )
defaultnoexcept

◆ operator=() [2/2]

template<class K , class V >
Bimap & sese::Bimap< K, V >::operator= ( const Bimap< K, V > & )
default

◆ size()

template<class K , class V >
size_t sese::Bimap< K, V >::size ( ) const
inlinenodiscard

◆ tryEraseByKey()

template<class K , class V >
bool sese::Bimap< K, V >::tryEraseByKey ( const BimapKeyType & key)
inline

◆ tryEraseByValue()

template<class K , class V >
bool sese::Bimap< K, V >::tryEraseByValue ( const BimapValueType & value)
inline

类成员变量说明

◆ first

◆ second


该类的文档由以下文件生成: