Abstract base class for registered arrays. More...
#include <ogdf/basic/RegisteredArray.h>
Public Member Functions | |
RegisteredArrayBase ()=default | |
Creates a registered array associated with no registry. More... | |
RegisteredArrayBase (const RegisteredArrayBase< Registry > ©) | |
Creates a registered array associated with the same registry as copy . More... | |
RegisteredArrayBase (RegisteredArrayBase< Registry > &&move_from) noexcept | |
Moves the registration of move_from to this registered array. More... | |
virtual | ~RegisteredArrayBase () noexcept |
Destructor. More... | |
virtual void | copyEntry (int newIndex, int oldIndex)=0 |
Copies the entry stored at oldIndex to newIndex . More... | |
RegisteredArrayBase & | operator= (const RegisteredArrayBase< Registry > ©) |
Assignment operator. More... | |
RegisteredArrayBase & | operator= (RegisteredArrayBase< Registry > &&move_from) noexcept |
Assignment operator (move semantics). More... | |
const Registry * | registeredAt () const |
Returns a pointer to the associated registry. More... | |
virtual void | resize (int size, bool shrink)=0 |
Resizes the registered array to size . The array will only shrink if shrink is true . More... | |
virtual void | swapEntries (int index1, int index2)=0 |
Swaps the entries stored at index1 and index2 . More... | |
void | unregister () noexcept |
Clears the array and associates it with no registry. More... | |
Protected Member Functions | |
void | moveRegister (RegisteredArrayBase< Registry > &move_from) |
Moves array registration from move_from to this array. More... | |
void | reregister (const Registry *registry) |
Associates the array with a new registry. More... | |
Private Types | |
using | registration_iterator_type = typename Registry::registration_iterator_type |
using | registry_type = Registry |
Private Attributes | |
const Registry * | m_pRegistry = nullptr |
registration_iterator_type | m_registration |
Abstract base class for registered arrays.
Defines the interface for event handling used by the registry.
Registry | The class which manages the registered keys. Must provide the functions defined in class RegistryBase. |
Definition at line 57 of file RegisteredArray.h.
|
private |
Definition at line 259 of file RegisteredArray.h.
|
private |
Definition at line 258 of file RegisteredArray.h.
|
default |
Creates a registered array associated with no registry.
|
inline |
Creates a registered array associated with the same registry as copy
.
Definition at line 269 of file RegisteredArray.h.
|
inlinenoexcept |
Moves the registration of move_from
to this registered array.
Definition at line 272 of file RegisteredArray.h.
|
inlinevirtualnoexcept |
Destructor.
Definition at line 289 of file RegisteredArray.h.
|
pure virtual |
Copies the entry stored at oldIndex
to newIndex
.
Implemented in ogdf::internal::RegisteredArrayWithoutDefaultOrIndexAccess< Registry, Value >.
|
inlineprotected |
Moves array registration from move_from
to this array.
Definition at line 325 of file RegisteredArray.h.
|
inline |
Assignment operator.
Definition at line 277 of file RegisteredArray.h.
|
inlinenoexcept |
Assignment operator (move semantics).
Definition at line 283 of file RegisteredArray.h.
|
inline |
Returns a pointer to the associated registry.
Definition at line 340 of file RegisteredArray.h.
|
inlineprotected |
Associates the array with a new registry.
Definition at line 312 of file RegisteredArray.h.
|
pure virtual |
Resizes the registered array to size
. The array will only shrink if shrink
is true
.
Implemented in ogdf::internal::RegisteredArrayWithoutDefaultOrIndexAccess< Registry, Value >.
|
pure virtual |
Swaps the entries stored at index1
and index2
.
Implemented in ogdf::internal::RegisteredArrayWithoutDefaultOrIndexAccess< Registry, Value >.
|
inlinenoexcept |
Clears the array and associates it with no registry.
Definition at line 305 of file RegisteredArray.h.
|
private |
Definition at line 262 of file RegisteredArray.h.
|
private |
Definition at line 261 of file RegisteredArray.h.