Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

PCRegistry.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include <ogdf/basic/basic.h>
36 
37 namespace ogdf::pc_tree {
38 class PCNode;
39 class PCTreeForest;
40 
44 class OGDF_EXPORT PCTreeRegistry : public ogdf::RegistryBase<PCNode*, PCTreeRegistry> {
46 
47 public:
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 }
ogdf::RegistryBase
Abstract base class for registries.
Definition: RegisteredArray.h:104
ogdf::pc_tree::PCTreeRegistry::getForest
PCTreeForest & getForest() const
Definition: PCRegistry.h:66
ogdf::pc_tree
Definition: NodePCRotation.h:47
ogdf::pc_tree::PCTreeRegistry
A registry that allows labelling the nodes of a PC-tree.
Definition: PCRegistry.h:44
ogdf::pc_tree::PCTreeRegistry::PCTreeRegistry
PCTreeRegistry(PCTreeForest *pcTreeForest)
Definition: PCRegistry.h:48
ogdf::pc_tree::PCTreeRegistry::m_pForest
PCTreeForest * m_pForest
Definition: PCRegistry.h:45
ogdf::pc_tree::PCTreeForest
Multiple PCTrees can be created within the same PCTreeForest, which allows merging the trees later on...
Definition: PCTreeForest.h:59
PCEnum.h
Predeclaration of various PC-tree related classes and enums.
ogdf::pc_tree::PCNode
A node in a PC-tree that is either a P-node, C-node or leaf.
Definition: PCNode.h:62
basic.h
Basic declarations, included by all source files.
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101