RegisteredArrayWithoutDefaultOrIndexAccess that also allows accessing its values directly by their index. More...
#include <ogdf/basic/RegisteredArray.h>
Inheritance diagram for ogdf::internal::RegisteredArrayWithoutDefaultWithIndexAccess< Registry, Value >:Public Member Functions | |
| RegisteredArrayWithoutDefaultWithIndexAccess ()=default | |
| RegisteredArrayWithoutDefaultWithIndexAccess (const Registry *registry) | |
| RA::value_ref_type | operator[] (int idx) |
Returns a reference to the element with index idx. | |
| RA::value_const_ref_type | operator[] (int idx) const |
Returns a const reference to the element with index idx. | |
Public Member Functions inherited from ogdf::internal::RegisteredArrayWithoutDefaultOrIndexAccess< Registry, Value > | |
| RegisteredArrayWithoutDefaultOrIndexAccess ()=default | |
| Creates a new registered array associated with no registry. | |
| RegisteredArrayWithoutDefaultOrIndexAccess (const Registry *registry) | |
Creates a new registered array associated with registry. | |
| iterator | begin () |
| Returns an iterator to the first key-value pair in the array. | |
| const_iterator | begin () const |
| Returns a const iterator to the first key-value pair in the array. | |
| const_iterator | cbegin () const |
| Returns a const iterator to the first key-value pair in the array. | |
| const_iterator | cend () const |
| Returns the const past-the-end iterator of the array. | |
| iterator | end () |
| Returns the past-the-end iterator of the array. | |
| const_iterator | end () const |
| Returns the const past-the-end iterator of the array. | |
| void | fill (value_const_ref_type x) |
Fills all entries with value x. | |
| void | init (const Registry *registry=nullptr) |
Associates the array with registry. All entries are initialized using the default constructor of Value. | |
| value_ref_type | operator() (key_type key) |
Returns a reference to the element associated with key. | |
| value_const_ref_type | operator() (key_type key) const |
Returns a const reference to the element associated with key. | |
| value_ref_type | operator[] (key_type key) |
Returns a reference to the element associated with key. | |
| value_const_ref_type | operator[] (key_type key) const |
Returns a const reference to the element associated with key. | |
| const Registry * | registeredAt () const |
| Returns a pointer to the associated registry. | |
| bool | valid () const |
| Returns true iff the array is associated with a registry. | |
Private Types | |
| using | RA = RegisteredArrayWithoutDefaultOrIndexAccess< Registry, Value > |
Additional Inherited Members | |
Public Types inherited from ogdf::internal::RegisteredArrayWithoutDefaultOrIndexAccess< Registry, Value > | |
| using | const_iterator = RegisteredArrayIterator< registered_array, key_iterator, true > |
| using | iterator = RegisteredArrayIterator< registered_array, key_iterator, false > |
| using | key_type = typename Registry::key_type |
| using | registry_type = Registry |
| using | value_const_ref_type = typename vector_type::const_reference |
| using | value_ref_type = typename vector_type::reference |
| using | value_type = typename vector_type::value_type |
| using | vector_type = std::vector< Value, OGDFAllocator< Value > > |
Protected Types inherited from ogdf::internal::RegisteredArrayWithoutDefaultOrIndexAccess< Registry, Value > | |
| using | key_iterator = typename Registry::iterator_type |
| using | registered_array = RegisteredArrayWithoutDefaultOrIndexAccess< Registry, Value > |
| using | registered_array_base = RegisteredArrayBase< Registry > |
Protected Member Functions inherited from ogdf::internal::RegisteredArrayWithoutDefaultOrIndexAccess< Registry, Value > | |
| void | copyEntry (int toIndex, int fromIndex) override |
| This operation is not supported for registered arrays without default. | |
| const Registry & | getRegistry () const |
| Returns a reference to the associated registry. | |
| void | resize (int size, bool shrink) override |
Resizes the registered array to size. The array will only shrink if shrink is true. | |
| void | swapEntries (int index1, int index2) override |
Swaps the entries stored at index1 and index2. | |
Protected Member Functions inherited from ogdf::internal::RegisteredArrayBase< Registry > | |
| void | moveRegister (RegisteredArrayBase< Registry > &move_from) |
Moves array registration from move_from to this array. | |
| void | reregister (const Registry *registry) |
| Associates the array with a new registry. | |
| RegisteredArrayBase ()=default | |
| Creates a registered array associated with no registry. | |
| RegisteredArrayBase (const RegisteredArrayBase< Registry > ©) | |
Creates a registered array associated with the same registry as copy. | |
| RegisteredArrayBase (RegisteredArrayBase< Registry > &&move_from) noexcept | |
Moves the registration of move_from to this registered array. | |
| virtual | ~RegisteredArrayBase () noexcept |
| Destructor. | |
| RegisteredArrayBase & | operator= (const RegisteredArrayBase< Registry > ©) |
| Assignment operator. | |
| RegisteredArrayBase & | operator= (RegisteredArrayBase< Registry > &&move_from) noexcept |
| Assignment operator (move semantics). | |
| const Registry * | registeredAt () const |
| Returns a pointer to the associated registry. | |
| void | unregister () noexcept |
| Clears the array and associates it with no registry. | |
Protected Attributes inherited from ogdf::internal::RegisteredArrayWithoutDefaultOrIndexAccess< Registry, Value > | |
| vector_type | m_data |
RegisteredArrayWithoutDefaultOrIndexAccess that also allows accessing its values directly by their index.
Definition at line 647 of file RegisteredArray.h.
|
private |
Definition at line 649 of file RegisteredArray.h.
|
default |
|
inlineexplicit |
Definition at line 654 of file RegisteredArray.h.
|
inline |
Returns a reference to the element with index idx.
Definition at line 669 of file RegisteredArray.h.
|
inline |
Returns a const reference to the element with index idx.
Definition at line 660 of file RegisteredArray.h.