GEOSX
|
#include <KeyIndexT.hpp>
Public Types | |
using | key_type = KEY_TYPE |
the type used for the map key | |
using | index_type = INDEX_TYPE |
the type used for the index | |
Public Member Functions | |
KeyIndexT ()=delete | |
Deleted default constructor. | |
KeyIndexT (KEY_TYPE const &key) | |
Constructor that sets the key. More... | |
KeyIndexT (KeyIndexT const &)=default | |
Copy constructor. | |
KeyIndexT & | operator= (KeyIndexT const &)=default |
Copy assignment operator. More... | |
KeyIndexT (KeyIndexT &&)=default | |
Move constructor. | |
KeyIndexT & | operator= (KeyIndexT &&)=default |
Move assignment operator. More... | |
bool | operator== (KEY_TYPE const &key) const |
Comparison equals operator. More... | |
virtual | ~KeyIndexT () |
Destructor. | |
KEY_TYPE const & | Key () const |
Access for the key. More... | |
INDEX_TYPE const & | Index () const |
Access for the index. More... | |
bool | isIndexSet () const |
Check to see of the index has been set. More... | |
void | setIndex (INDEX_TYPE const &index) const |
Set the index. More... | |
Static Public Attributes | |
static constexpr INDEX_TYPE | invalid_index = INVALID_INDEX |
the value of an invalid index | |
KEY_TYPE | the key type |
INDEX_TYPE | the index type |
INVALID_INDEX | the value of an unset/invalid index |
This class is used for fast index based lookups for a MappedVector type. It is templated on a contains a KEY_TYPE, which is defaulted to a string, an INDEX_TYPE that defaults to an int. The key is const, while the index is set upon first use. The intent is to use the index for lookups, and check the key to confirm the key is correct.
Definition at line 40 of file KeyIndexT.hpp.
|
inline |
Constructor that sets the key.
[in] | key | the key that defines the KeyIndex |
Definition at line 61 of file KeyIndexT.hpp.
|
inline |
Access for the index.
Definition at line 112 of file KeyIndexT.hpp.
|
inline |
Check to see of the index has been set.
Definition at line 119 of file KeyIndexT.hpp.
|
inline |
Access for the key.
Definition at line 105 of file KeyIndexT.hpp.
|
default |
Copy assignment operator.
|
default |
Move assignment operator.
|
inline |
Comparison equals operator.
key | the key to compare |
Definition at line 93 of file KeyIndexT.hpp.
|
inline |
Set the index.
[in] | index | new value of the index |
Definition at line 128 of file KeyIndexT.hpp.