CASM
1.1.0
A Clusters Approach to Statistical Mechanics
|
#include <unique_map.hh>
std::map wrapper to enforce a 1-1 ValueType->KeyType relationship
Template Parameters:
Definition at line 124 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 139 of file unique_map.hh.
typedef MapType::const_iterator notstd::unique_map< KeyType, ValueType, MapType, TransformFunction, ConstTransformFunction >::ConstMapIterator |
Definition at line 135 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 130 of file unique_map.hh.
typedef UniqueMapIterator<TransformFunction, MapIterator> notstd::unique_map< KeyType, ValueType, MapType, TransformFunction, ConstTransformFunction >::iterator |
Definition at line 137 of file unique_map.hh.
typedef KeyType notstd::unique_map< KeyType, ValueType, MapType, TransformFunction, ConstTransformFunction >::key_type |
Definition at line 127 of file unique_map.hh.
typedef std::function<KeyType(const ValueType &)> notstd::unique_map< KeyType, ValueType, MapType, TransformFunction, ConstTransformFunction >::KeyFuncType |
Definition at line 128 of file unique_map.hh.
typedef MapType::iterator notstd::unique_map< KeyType, ValueType, MapType, TransformFunction, ConstTransformFunction >::MapIterator |
Definition at line 134 of file unique_map.hh.
typedef ValueType* notstd::unique_map< KeyType, ValueType, MapType, TransformFunction, ConstTransformFunction >::pointer |
Definition at line 132 of file unique_map.hh.
typedef ValueType& notstd::unique_map< KeyType, ValueType, MapType, TransformFunction, ConstTransformFunction >::reference |
Definition at line 131 of file unique_map.hh.
typedef MapType::size_type notstd::unique_map< KeyType, ValueType, MapType, TransformFunction, ConstTransformFunction >::size_type |
Definition at line 141 of file unique_map.hh.
typedef ValueType notstd::unique_map< KeyType, ValueType, MapType, TransformFunction, ConstTransformFunction >::value_type |
Definition at line 126 of file unique_map.hh.
|
inlineexplicit |
Definition at line 143 of file unique_map.hh.
|
inlineprivate |
Dictionary insert.
Definition at line 235 of file unique_map.hh.
|
inlineprivate |
Copy insert.
Definition at line 227 of file unique_map.hh.
|
inline |
Definition at line 213 of file unique_map.hh.
|
inline |
Definition at line 215 of file unique_map.hh.
|
inline |
Definition at line 217 of file unique_map.hh.
|
inline |
Definition at line 223 of file unique_map.hh.
|
inline |
Definition at line 197 of file unique_map.hh.
|
inline |
Definition at line 211 of file unique_map.hh.
|
inline |
Definition at line 219 of file unique_map.hh.
|
inline |
Definition at line 221 of file unique_map.hh.
|
inline |
Definition at line 207 of file unique_map.hh.
|
inline |
Definition at line 203 of file unique_map.hh.
|
inline |
Definition at line 199 of file unique_map.hh.
|
inline |
Definition at line 191 of file unique_map.hh.
|
inline |
Definition at line 193 of file unique_map.hh.
|
inline |
Insert single value.
Definition at line 149 of file unique_map.hh.
|
inline |
Variadic insert accepts as const UniqueMap& or const ValueType&.
Definition at line 169 of file unique_map.hh.
|
inline |
Insert single value.
Definition at line 154 of file unique_map.hh.
|
inline |
Iterator range insert.
Definition at line 175 of file unique_map.hh.
|
inline |
Insert single value.
Definition at line 161 of file unique_map.hh.
|
inline |
Definition at line 146 of file unique_map.hh.
|
inline |
Definition at line 183 of file unique_map.hh.
|
inline |
Definition at line 209 of file unique_map.hh.
|
private |
Definition at line 242 of file unique_map.hh.
|
private |
Definition at line 241 of file unique_map.hh.
|
private |
Definition at line 240 of file unique_map.hh.