Registered arrays with default values. More...
#include <ogdf/basic/RegisteredArray.h>
Inheritance diagram for ogdf::internal::RegisteredArrayWithDefault< Registry, Value >:Public Member Functions | |
| RegisteredArrayWithDefault () | |
| Creates a new registered array associated with no registry and a default-constructed default value. | |
| RegisteredArrayWithDefault (const Registry *registry) | |
Creates a new registered array associated with registry and a default-constructed default value. | |
| RegisteredArrayWithDefault (const Registry *registry, const Value &def) | |
Creates a new registered array associated with registry and default value def. | |
| RegisteredArrayWithDefault (const Registry *registry, Value &&def) | |
Creates a new registered array associated with registry and default value def. | |
| RegisteredArrayWithDefault (const Value &def) | |
Creates a new registered array associated with no registry and default value def. | |
| RegisteredArrayWithDefault (Value &&def) | |
Creates a new registered array associated with no registry and default value def. | |
| void | fillWithDefault () |
| Overwrites all values with the current default value. | |
| Value & | getDefault () |
| Returns the current default value for new keys. | |
| const Value & | getDefault () const |
| Returns the current default value for new keys. | |
| void | setDefault (const Value &def) |
| Sets a new default value for new keys. | |
| void | setDefault (Value &&def) |
| Sets a new default value for new keys. | |
Protected Member Functions | |
| void | copyEntry (int toIndex, int fromIndex) override |
Copies the entry stored at oldIndex to newIndex. | |
| void | resize (int size, bool shrink) override |
Private Types | |
| using | RA = RegisteredArrayWithoutDefault< Registry, Value > |
Private Attributes | |
| Value | m_default |
Registered arrays with default values.
Extends the functionality of RegisteredArrayWithoutDefault by adding the possibility to set a specific default value for new keys added to the registry.
| Registry | The class which manages the registered keys. Must provide the functions defined in class RegistryBase. |
| Value | The type of the stored data. |
Definition at line 699 of file RegisteredArray.h.
|
private |
Definition at line 700 of file RegisteredArray.h.
|
inlineexplicit |
Creates a new registered array associated with no registry and a default-constructed default value.
Definition at line 710 of file RegisteredArray.h.
|
inlineexplicit |
Creates a new registered array associated with registry and a default-constructed default value.
Definition at line 713 of file RegisteredArray.h.
|
inlineexplicit |
Creates a new registered array associated with no registry and default value def.
Definition at line 719 of file RegisteredArray.h.
|
inlineexplicit |
Creates a new registered array associated with registry and default value def.
Definition at line 722 of file RegisteredArray.h.
|
inlineexplicit |
Creates a new registered array associated with no registry and default value def.
Definition at line 729 of file RegisteredArray.h.
|
inlineexplicit |
Creates a new registered array associated with registry and default value def.
Definition at line 732 of file RegisteredArray.h.
|
inlineoverrideprotected |
Copies the entry stored at oldIndex to newIndex.
Definition at line 755 of file RegisteredArray.h.
|
inline |
Overwrites all values with the current default value.
Definition at line 751 of file RegisteredArray.h.
|
inline |
Returns the current default value for new keys.
Definition at line 748 of file RegisteredArray.h.
|
inline |
Returns the current default value for new keys.
Definition at line 745 of file RegisteredArray.h.
|
inlineoverrideprotected |
Definition at line 759 of file RegisteredArray.h.
|
inline |
Sets a new default value for new keys.
Definition at line 742 of file RegisteredArray.h.
|
inline |
Sets a new default value for new keys.
Definition at line 739 of file RegisteredArray.h.
|
private |
Definition at line 701 of file RegisteredArray.h.