Open
Graph Drawing
Framework
v. snapshot-2017-02-16
Overview
Class Hierarchy
Class Index
Class List
Members
Namespaces
Source Files
EdgeTypePatterns.h
Go to the documentation of this file.
1
32
//edge type patterns:
33
//FOUR TYPE LEVELS:
34
//primary holds information about generalization/association,...
35
//secondary about merger edges,...
36
//user edge types can be set locally
37
38
#pragma once
39
40
namespace
ogdf
{
41
42
using
edgeType
=
long
long;
43
44
enum class
UMLEdgeTypePatterns
:
edgeType
{
45
Primary
= 0x0000000f,
46
Secondary
= 0x000000f0,
47
Tertiary
= 0x00000f00,
48
Fourth
= 0x0000f000,
49
User
= 0xff000000,
50
All
= 0xffffffff
51
};
52
53
inline
edgeType
operator &
(
edgeType
lhs,
UMLEdgeTypePatterns
rhs) {
54
return
lhs &
static_cast<
edgeType
>
(rhs);
55
}
56
57
inline
edgeType
operator &
(
UMLEdgeTypePatterns
lhs,
edgeType
rhs) {
58
return
static_cast<
edgeType
>
(lhs) & rhs;
59
}
60
61
inline
edgeType
operator <<
(
edgeType
lhs,
UMLEdgeTypePatterns
rhs) {
62
return
lhs << static_cast<edgeType>(rhs);
63
}
64
65
enum class
UMLEdgeTypeConstants
{
66
//primary types (should be disjoint bits)
67
PrimAssociation
= 0x1,
PrimGeneralization
= 0x2,
PrimDependency
= 0x4,
68
//secondary types: reason of insertion (should be disjoint types, but not bits,
69
//but may not completely cover others that are allowed to be set together)
70
//preliminary: setsecondarytype deletes old type
71
//edge in Expansion, dissection edge, face splitter, cluster boundary
72
SecExpansion
= 0x1,
SecDissect
= 0x2,
SecFaceSplitter
= 0x3,
73
SecCluster
= 0x4,
SecClique
,
//the boundaries
74
//tertiary types: special types
75
//merger edge, vertical in hierarchy, alignment, association class connnection
76
Merger
= 0x1,
Vertical
= 0x2,
Align
= 0x3,
AssClass
= 0x8,
77
//fourth types: relation of nodes
78
//direct neighbours in hierarchy = brother, neighbour = halfbrother
79
//same level = cousin, to merger = ToMerger, from Merger = FromMerger
80
Brother
= 0x1,
HalfBrother
= 0x2,
Cousin
= 0x3,
81
//fifth level types
82
FifthToMerger
= 0x1,
FifthFromMerger
= 0x2
83
//user type hint: what you have done with the edge, e.g. brother edge
84
//that is embedded crossing free and should be drawn bend free
85
};
86
87
inline
edgeType
operator &
(
edgeType
lhs,
UMLEdgeTypeConstants
rhs) {
88
return
lhs &
static_cast<
edgeType
>
(rhs);
89
}
90
91
inline
bool
operator ==
(
edgeType
lhs,
UMLEdgeTypeConstants
rhs) {
92
return
lhs ==
static_cast<
edgeType
>
(rhs);
93
}
94
95
enum class
UMLEdgeTypeOffsets
{
96
Primary
= 0,
97
Secondary
= 4,
98
Tertiary
= 8,
99
Fourth
= 12,
100
Fifth
= 16,
101
User
= 24
102
};
103
104
inline
edgeType
operator >>
(
edgeType
lhs,
UMLEdgeTypeOffsets
rhs) {
105
return
lhs >>
static_cast<
edgeType
>
(rhs);
106
}
107
108
inline
edgeType
operator <<
(
edgeType
lhs,
UMLEdgeTypeOffsets
rhs) {
109
return
lhs << static_cast<edgeType>(rhs);
110
}
111
112
inline
edgeType
operator <<
(
UMLEdgeTypeConstants
lhs,
UMLEdgeTypeOffsets
rhs) {
113
return
static_cast<
edgeType
>
(lhs) << static_cast<edgeType>(rhs);
114
}
115
116
}
//end namespace ogdf
ogdf::UMLEdgeTypeConstants::Cousin
ogdf::UMLEdgeTypeConstants::SecExpansion
ogdf::operator&
int operator&(int i, TopologyModule::Options b)
Definition:
TopologyModule.h:203
ogdf::UMLEdgeTypePatterns::User
ogdf::UMLEdgeTypePatterns
UMLEdgeTypePatterns
Definition:
EdgeTypePatterns.h:44
ogdf::UMLEdgeTypeConstants::AssClass
ogdf::UMLEdgeTypeConstants::FifthFromMerger
ogdf::operator>>
static std::istream & operator>>(std::istream &inStream, HyperGraph::NodeArray< T > &array)
Definition:
HyperGraph.h:814
ogdf::UMLEdgeTypeConstants::SecCluster
ogdf::UMLEdgeTypePatterns::Tertiary
ogdf::UMLEdgeTypeConstants::Align
ogdf::UMLEdgeTypeConstants
UMLEdgeTypeConstants
Definition:
EdgeTypePatterns.h:65
ogdf::UMLEdgeTypePatterns::Primary
ogdf::UMLEdgeTypePatterns::Secondary
ogdf::UMLEdgeTypeConstants::SecDissect
ogdf::UMLEdgeTypeConstants::PrimDependency
ogdf::UMLEdgeTypeOffsets
UMLEdgeTypeOffsets
Definition:
EdgeTypePatterns.h:95
ogdf::operator<<
ostream & operator<<(ostream &os, const ogdf::Array< E, INDEX > &a)
Prints array a to output stream os.
Definition:
Array.h:764
ogdf::UMLEdgeTypeConstants::FifthToMerger
ogdf::UMLEdgeTypeConstants::SecClique
ogdf::UMLEdgeTypeConstants::HalfBrother
ogdf::UMLEdgeTypeConstants::PrimAssociation
ogdf::UMLEdgeTypeConstants::Brother
ogdf::UMLEdgeTypeOffsets::Fifth
ogdf::UMLEdgeTypePatterns::Fourth
ogdf::UMLEdgeTypeConstants::PrimGeneralization
ogdf
The namespace for all OGDF objects.
Definition:
DfsMakeBiconnected.h:36
ogdf::edgeType
long long edgeType
Definition:
EdgeTypePatterns.h:42
ogdf::UMLEdgeTypeConstants::Merger
ogdf::UMLEdgeTypePatterns::All
ogdf::operator==
bool operator==(const Tuple2< E1, E2 > &t1, const Tuple2< E1, E2 > &t2)
Equality operator for 2-tuples.
Definition:
tuples.h:75
ogdf::FillPattern::Vertical
ogdf::UMLEdgeTypeConstants::SecFaceSplitter
include
ogdf
planarity
EdgeTypePatterns.h
© 1999–2017
The OGDF Team