CASM
AClustersApproachtoStatisticalMechanics
|
#include <unique_map.hh>
std::map wrapper to enforce a 1-1 ValueType->KeyType relationship
Template Parameters:
Definition at line 141 of file unique_map.hh.
Public Types | |
typedef ValueType | value_type |
typedef KeyType | key_type |
typedef std::function< KeyType(const ValueType &)> | KeyFuncType |
typedef std::function < typename MapType::mapped_type(const ValueType &)> | ConvertType |
typedef ValueType & | reference |
typedef ValueType * | pointer |
typedef MapType::iterator | MapIterator |
typedef MapType::const_iterator | ConstMapIterator |
typedef UniqueMapIterator < TransformFunction, MapIterator > | iterator |
typedef UniqueMapIterator < ConstTransformFunction, ConstMapIterator > | const_iterator |
typedef MapType::size_type | size_type |
Public Member Functions | |
unique_map (KeyFuncType keyfunc, ConvertType _converter) | |
key_type | key (const value_type &value) const |
std::pair< iterator, bool > | insert (const value_type &value) |
Insert single value. More... | |
iterator | insert (const_iterator hint, const value_type &value) |
Insert single value. More... | |
iterator | insert (iterator hint, const value_type &value) |
Insert single value. More... | |
template<typename... ValuesOrMaps> | |
void | insert (const ValuesOrMaps &...more) |
Variadic insert accepts as const UniqueMap& or const ValueType&. More... | |
template<typename Iterator > | |
void | insert (Iterator begin, Iterator end, typename CASM::CASM_TMP::enable_if_iterator< Iterator >::type *=nullptr) |
Iterator range insert. More... | |
value_type & | operator[] (const key_type &key) |
iterator | find (const key_type &key) |
const_iterator | find (const key_type &key) const |
void | clear () |
iterator | erase (const_iterator pos) |
iterator | erase (const_iterator first, const_iterator last) |
size_type | erase (const key_type &key) |
size_type | size () const |
bool | empty () const |
iterator | begin () |
const_iterator | begin () const |
const_iterator | cbegin () const |
iterator | end () |
const_iterator | end () const |
const_iterator | cend () const |
Private Member Functions | |
std::pair< iterator, bool > | _insert (const value_type &value) |
Copy insert. More... | |
template<typename A , typename B , typename C , typename D , typename E > | |
int | _insert (const unique_map< A, B, C, D, E > &value) |
Dictionary insert. More... | |
Private Attributes | |
MapType | m_map |
KeyFuncType | m_keyfunc |
ConvertType | m_converter |
typedef UniqueMapIterator<ConstTransformFunction, ConstMapIterator> notstd::unique_map< KeyType, ValueType, MapType, TransformFunction, ConstTransformFunction >::const_iterator |
Definition at line 156 of file unique_map.hh.
typedef MapType::const_iterator notstd::unique_map< KeyType, ValueType, MapType, TransformFunction, ConstTransformFunction >::ConstMapIterator |
Definition at line 153 of file unique_map.hh.
typedef std::function<typename MapType::mapped_type(const ValueType &)> notstd::unique_map< KeyType, ValueType, MapType, TransformFunction, ConstTransformFunction >::ConvertType |
Definition at line 148 of file unique_map.hh.
typedef UniqueMapIterator<TransformFunction, MapIterator> notstd::unique_map< KeyType, ValueType, MapType, TransformFunction, ConstTransformFunction >::iterator |
Definition at line 155 of file unique_map.hh.
typedef KeyType notstd::unique_map< KeyType, ValueType, MapType, TransformFunction, ConstTransformFunction >::key_type |
Definition at line 146 of file unique_map.hh.
typedef std::function<KeyType(const ValueType &)> notstd::unique_map< KeyType, ValueType, MapType, TransformFunction, ConstTransformFunction >::KeyFuncType |
Definition at line 147 of file unique_map.hh.
typedef MapType::iterator notstd::unique_map< KeyType, ValueType, MapType, TransformFunction, ConstTransformFunction >::MapIterator |
Definition at line 152 of file unique_map.hh.
typedef ValueType* notstd::unique_map< KeyType, ValueType, MapType, TransformFunction, ConstTransformFunction >::pointer |
Definition at line 150 of file unique_map.hh.
typedef ValueType& notstd::unique_map< KeyType, ValueType, MapType, TransformFunction, ConstTransformFunction >::reference |
Definition at line 149 of file unique_map.hh.
typedef MapType::size_type notstd::unique_map< KeyType, ValueType, MapType, TransformFunction, ConstTransformFunction >::size_type |
Definition at line 158 of file unique_map.hh.
typedef ValueType notstd::unique_map< KeyType, ValueType, MapType, TransformFunction, ConstTransformFunction >::value_type |
Definition at line 145 of file unique_map.hh.
|
inlineexplicit |
Definition at line 160 of file unique_map.hh.
|
inlineprivate |
Copy insert.
Definition at line 275 of file unique_map.hh.
|
inlineprivate |
Dictionary insert.
Definition at line 282 of file unique_map.hh.
|
inline |
Definition at line 247 of file unique_map.hh.
|
inline |
Definition at line 251 of file unique_map.hh.
|
inline |
Definition at line 255 of file unique_map.hh.
|
inline |
Definition at line 267 of file unique_map.hh.
|
inline |
Definition at line 223 of file unique_map.hh.
|
inline |
Definition at line 243 of file unique_map.hh.
|
inline |
Definition at line 259 of file unique_map.hh.
|
inline |
Definition at line 263 of file unique_map.hh.
|
inline |
Definition at line 227 of file unique_map.hh.
|
inline |
Definition at line 231 of file unique_map.hh.
|
inline |
Definition at line 235 of file unique_map.hh.
|
inline |
Definition at line 215 of file unique_map.hh.
|
inline |
Definition at line 219 of file unique_map.hh.
|
inline |
Insert single value.
Definition at line 169 of file unique_map.hh.
|
inline |
Insert single value.
Definition at line 174 of file unique_map.hh.
|
inline |
Insert single value.
Definition at line 184 of file unique_map.hh.
|
inline |
Variadic insert accepts as const UniqueMap& or const ValueType&.
Definition at line 195 of file unique_map.hh.
|
inline |
Iterator range insert.
Definition at line 201 of file unique_map.hh.
|
inline |
Definition at line 164 of file unique_map.hh.
|
inline |
Definition at line 207 of file unique_map.hh.
|
inline |
Definition at line 239 of file unique_map.hh.
|
private |
Definition at line 289 of file unique_map.hh.
|
private |
Definition at line 288 of file unique_map.hh.
|
private |
Definition at line 287 of file unique_map.hh.