GEOS
|
#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 | |
constexpr static 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 41 of file KeyIndexT.hpp.
|
inline |
Constructor that sets the key.
[in] | key | the key that defines the KeyIndex |
Definition at line 62 of file KeyIndexT.hpp.
|
inline |
Access for the index.
Definition at line 113 of file KeyIndexT.hpp.
|
inline |
Check to see of the index has been set.
Definition at line 120 of file KeyIndexT.hpp.
|
inline |
Access for the key.
Definition at line 106 of file KeyIndexT.hpp.
|
default |
Move assignment operator.
|
default |
Copy assignment operator.
|
inline |
Comparison equals operator.
key | the key to compare |
Definition at line 94 of file KeyIndexT.hpp.
|
inline |
Set the index.
[in] | index | new value of the index |
Definition at line 129 of file KeyIndexT.hpp.