![]() |
NEURON
|
An owning permutation-stable identifier for a entry in a container. More...
#include <soa_identifier.hpp>
Public Types | |
using | storage_type = Storage |
Public Member Functions | |
owning_identifier (Storage &storage) | |
Create a non-null owning identifier by creating a new entry. More... | |
owning_identifier (const owning_identifier &)=delete | |
owning_identifier (owning_identifier &&other) noexcept | |
owning_identifier & | operator= (const owning_identifier &)=delete |
owning_identifier & | operator= (owning_identifier &&other) |
~owning_identifier () | |
Storage & | underlying_storage () |
Return a reference to the container in which this entry lives. More... | |
Storage const & | underlying_storage () const |
Return a const reference to the container in which this entry lives. More... | |
operator non_owning_identifier< Storage > () const | |
operator non_owning_identifier_without_container () const | |
std::size_t | current_row () const |
What is the current row? More... | |
Private Member Functions | |
owning_identifier ()=default | |
void | destroy () |
void | set_current_row (std::size_t new_row) |
owning_identifier (Storage &storage, std::size_t row) | |
Create a non-null owning identifier that owns the given row. More... | |
Private Attributes | |
non_owning_identifier_without_container | m_ptr {} |
Storage * | m_data_ptr {} |
Friends | |
template<typename , typename... > | |
struct | soa |
std::ostream & | operator<< (std::ostream &os, owning_identifier const &oi) |
An owning permutation-stable identifier for a entry in a container.
Storage | The type of the referred-to container, which is expected to be a type derived from neuron::container::soa<...> |
This identifier has owning semantics, meaning that when it is destroyed the corresponding entry in the container is deleted.
Definition at line 72 of file soa_identifier.hpp.
using neuron::container::owning_identifier< Storage >::storage_type = Storage |
Definition at line 139 of file soa_identifier.hpp.
|
inline |
Create a non-null owning identifier by creating a new entry.
Definition at line 76 of file soa_identifier.hpp.
|
delete |
|
inlinenoexcept |
Definition at line 80 of file soa_identifier.hpp.
|
inline |
Definition at line 98 of file soa_identifier.hpp.
|
privatedefault |
|
inlineprivate |
Create a non-null owning identifier that owns the given row.
This is used inside neuron::container::soa<...>::acquire_owning_identifier() and should not be used without great care.
Definition at line 210 of file 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 130 of file soa_identifier.hpp.
|
inlineprivate |
Definition at line 144 of file soa_identifier.hpp.
|
inline |
Definition at line 116 of file soa_identifier.hpp.
|
inline |
Definition at line 120 of file soa_identifier.hpp.
|
delete |
|
inline |
Definition at line 87 of file soa_identifier.hpp.
|
inlineprivate |
Definition at line 199 of file soa_identifier.hpp.
|
inline |
Return a reference to the container in which this entry lives.
Definition at line 105 of file soa_identifier.hpp.
|
inline |
Return a const reference to the container in which this entry lives.
Definition at line 112 of file soa_identifier.hpp.
|
friend |
Definition at line 135 of file soa_identifier.hpp.
Definition at line 198 of file soa_identifier.hpp.
|
private |
Definition at line 195 of file soa_identifier.hpp.
|
private |
Definition at line 194 of file soa_identifier.hpp.