Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
PCRegistry.h
Go to the documentation of this file.
1
32#pragma once
33
34#include <ogdf/basic/basic.h>
36
37namespace ogdf::pc_tree {
38class PCNode;
39class PCTreeForest;
40
44class OGDF_EXPORT PCTreeRegistry : public ogdf::RegistryBase<PCNode*, PCTreeRegistry> {
46
47public:
48 PCTreeRegistry(PCTreeForest* pcTreeForest) : m_pForest(pcTreeForest) { }
49
51 static inline int keyToIndex(PCNode* key);
52
54 bool isKeyAssociated(PCNode* key) const;
55
57 int maxKeyIndex() const;
58
60 int calculateArraySize(int add) const;
61
62 operator PCTreeForest&() const { return *m_pForest; }
63
64 operator PCTreeForest*() const { return m_pForest; }
65
66 PCTreeForest& getForest() const { return *m_pForest; }
67};
68}
Predeclaration of various PC-tree related classes and enums.
Basic declarations, included by all source files.
Abstract base class for registries.
A node in a PC-tree that is either a P-node, C-node or leaf.
Definition PCNode.h:62
Multiple PCTrees can be created within the same PCTreeForest, which allows merging the trees later on...
A registry that allows labelling the nodes of a PC-tree.
Definition PCRegistry.h:44
PCTreeForest & getForest() const
Definition PCRegistry.h:66
PCTreeRegistry(PCTreeForest *pcTreeForest)
Definition PCRegistry.h:48
bool isKeyAssociated(PCNode *key) const
Returns whether key is associated with this registry.
int maxKeyIndex() const
Returns the maximum index of all keys managed by this registry.
int calculateArraySize(int add) const
Returns the array size currently requested by this registry.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
Definition config.h:117