Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

RegisteredArray.h File Reference

Declaration and implementation of RegisteredArray class. More...

#include <ogdf/basic/Math.h>
#include <ogdf/basic/basic.h>
#include <ogdf/basic/internal/config_autogen.h>
#include <ogdf/basic/memory.h>
#include <algorithm>
#include <cstddef>
#include <iterator>
#include <list>
#include <memory>
#include <type_traits>
#include <utility>
#include <vector>
#include <mutex>

Go to the source code of this file.

Classes

class  ogdf::internal::RegisteredArrayBase< Registry >
 Abstract base class for registered arrays. More...
 
class  ogdf::internal::RegisteredArrayBase< Registry >
 Abstract base class for registered arrays. More...
 
class  ogdf::internal::RegisteredArrayWithDefault< Registry, Value >
 Registered arrays with default values. More...
 
class  ogdf::internal::RegisteredArrayWithoutDefaultOrIndexAccess< Registry, Value >
 Registered arrays without default values or by-index access to values. More...
 
class  ogdf::internal::RegisteredArrayWithoutDefaultWithIndexAccess< Registry, Value >
 RegisteredArrayWithoutDefaultOrIndexAccess that also allows accessing its values directly by their index. More...
 
class  ogdf::RegisteredArray< Registry, Value, WithDefault, Base >
 Dynamic arrays indexed with arbitrary keys. More...
 
class  ogdf::RegisteredArray< Registry, bool, WithDefault, Base >
 Specialization to work around vector<bool>. More...
 
class  ogdf::RegisteredArrayIterator< ArrayType, KeyIterator, isConst >
 Iterator for registered arrays. More...
 
class  ogdf::RegistryBase< Key, Registry, Iterator >
 Abstract base class for registries. More...
 

Namespaces

 ogdf
 The namespace for all OGDF objects.
 
 ogdf::internal
 

Macros

#define OGDF_DECL_REG_ARRAY(NAME)
 

Typedefs

template<class Registry , class Value >
using ogdf::internal::RegisteredArrayWithoutDefault = typename std::conditional_t< std::is_integral_v< typename Registry::key_type >, RegisteredArrayWithoutDefaultOrIndexAccess< Registry, Value >, RegisteredArrayWithoutDefaultWithIndexAccess< Registry, Value > >
 Registered arrays without default values that automatically allows by-index access to values if Registry::key_type is not already integral. More...
 

Functions

int ogdf::calculateTableSize (int actualCount)
 The default growth function for registered arrays. More...
 
template<typename RA1 , typename RA2 >
void invertRegisteredArray (const RA1 &from, RA2 &to)
 Copy data from a ABCArray<XYZ> to an XYZArray<ABC> More...
 

Variables

static constexpr int ogdf::MIN_TABLE_SIZE = (1 << 4)
 The default minimum table size for registered arrays. More...
 

Detailed Description

Declaration and implementation of RegisteredArray class.

Author
Simon D. Fink
License:
This file is part of the Open Graph Drawing Framework (OGDF).
Copyright (C)
See README.md in the OGDF root directory for details.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License Version 2 or 3 as published by the Free Software Foundation; see the file LICENSE.txt included in the packaging of this file for details.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, see http://www.gnu.org/copyleft/gpl.html

Definition in file RegisteredArray.h.

Macro Definition Documentation

◆ OGDF_DECL_REG_ARRAY

#define OGDF_DECL_REG_ARRAY (   NAME)
Value:
template<typename Value, bool WithDefault = true> \
using NAME = OGDF_DECL_REG_ARRAY_TYPE(Value, WithDefault); \ \
template<typename Value> \
using NAME##P = NAME<std::unique_ptr<Value>, false>;

Definition at line 969 of file RegisteredArray.h.

Function Documentation

◆ invertRegisteredArray()

template<typename RA1 , typename RA2 >
void invertRegisteredArray ( const RA1 &  from,
RA2 &  to 
)
inline

Copy data from a ABCArray<XYZ> to an XYZArray<ABC>

Definition at line 960 of file RegisteredArray.h.

OGDF_DECL_REG_ARRAY_TYPE
#define OGDF_DECL_REG_ARRAY_TYPE(v, c)
Definition: CombinatorialEmbedding.h:191