![]() |
NEURON
|
A non-owning permutation-stable identifier for an entry in a container. More...
#include <non_owning_soa_identifier.hpp>
Public Member Functions | |
non_owning_identifier_without_container ()=default | |
Create a null identifier. More... | |
non_owning_identifier_without_container (const non_owning_identifier_without_container &other)=default | |
non_owning_identifier_without_container (non_owning_identifier_without_container &&other)=default | |
non_owning_identifier_without_container & | operator= (const non_owning_identifier_without_container &)=default |
non_owning_identifier_without_container & | operator= (non_owning_identifier_without_container &&)=default |
~non_owning_identifier_without_container ()=default | |
operator bool () const | |
Does the identifier refer to a valid entry? More... | |
std::size_t | current_row () const |
What is the current row? More... | |
bool | was_once_valid () const |
Did the identifier use to refer to a valid entry? More... | |
bool | has_always_been_null () const |
Has the identifier always been null. More... | |
Protected Member Functions | |
non_owning_identifier_without_container (std::shared_ptr< std::size_t > ptr) | |
void | set_current_row (std::size_t row) |
non_owning_identifier_without_container (size_t row) | |
Private Attributes | |
std::shared_ptr< std::size_t > | m_ptr {} |
Friends | |
template<typename > | |
struct | owning_identifier |
template<typename , typename... > | |
struct | soa |
struct | std::hash< non_owning_identifier_without_container > |
std::ostream & | operator<< (std::ostream &os, non_owning_identifier_without_container const &id) |
bool | operator== (non_owning_identifier_without_container lhs, non_owning_identifier_without_container rhs) |
Test if two handles are both null or refer to the same valid row. More... | |
bool | operator!= (non_owning_identifier_without_container lhs, non_owning_identifier_without_container rhs) |
bool | operator< (non_owning_identifier_without_container lhs, non_owning_identifier_without_container rhs) |
A non-owning permutation-stable identifier for an entry in a container.
The container type is not specified. This is essentially a wrapper for std::size_t* that avoids using that naked type in too many places.
Definition at line 25 of file non_owning_soa_identifier.hpp.
|
default |
Create a null identifier.
|
default |
|
default |
|
default |
|
inlineexplicitprotected |
Definition at line 122 of file non_owning_soa_identifier.hpp.
|
inlineexplicitprotected |
Definition at line 129 of file non_owning_soa_identifier.hpp.
|
inline |
What is the current row?
The returned value is invalidated by any deletions from the underlying container, and by any permutations of the underlying container.
Definition at line 61 of file non_owning_soa_identifier.hpp.
|
inline |
Has the identifier always been null.
has_always_been_null() --> "null" !has_always_been_null && was_once_valid --> "died" !has_always_been_null && !was_once_valid --> "row=X"
Definition at line 82 of file non_owning_soa_identifier.hpp.
|
inlineexplicit |
Does the identifier refer to a valid entry?
The row can be invalid because the identifier was always null, or it can have become invalid if the relevant entry was deleted after the identifier was created.
Definition at line 51 of file non_owning_soa_identifier.hpp.
|
default |
|
default |
|
inlineprotected |
Definition at line 124 of file non_owning_soa_identifier.hpp.
|
inline |
Did the identifier use to refer to a valid entry?
Definition at line 71 of file non_owning_soa_identifier.hpp.
|
friend |
Definition at line 104 of file non_owning_soa_identifier.hpp.
|
friend |
Definition at line 109 of file non_owning_soa_identifier.hpp.
|
friend |
Definition at line 86 of file non_owning_soa_identifier.hpp.
|
friend |
Test if two handles are both null or refer to the same valid row.
Definition at line 99 of file non_owning_soa_identifier.hpp.
|
friend |
Definition at line 117 of file non_owning_soa_identifier.hpp.
|
friend |
Definition at line 120 of file non_owning_soa_identifier.hpp.
|
friend |
Definition at line 120 of file non_owning_soa_identifier.hpp.
|
private |
Definition at line 133 of file non_owning_soa_identifier.hpp.