Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

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 
45  Primary = 0x0000000f,
46  Secondary = 0x000000f0,
47  Tertiary = 0x00000f00,
48  Fourth = 0x0000f000,
49  User = 0xff000000,
50  All = 0xffffffff
51 };
52 
54  return lhs & static_cast<edgeType>(rhs);
55 }
56 
58  return static_cast<edgeType>(lhs) & rhs;
59 }
60 
62  return lhs << static_cast<edgeType>(rhs);
63 }
64 
66  //primary types (should be disjoint bits)
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 
88  return lhs & static_cast<edgeType>(rhs);
89 }
90 
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 
105  return lhs >> static_cast<edgeType>(rhs);
106 }
107 
109  return lhs << static_cast<edgeType>(rhs);
110 }
111 
113  return static_cast<edgeType>(lhs) << static_cast<edgeType>(rhs);
114 }
115 
116 } //end namespace ogdf
int operator&(int i, TopologyModule::Options b)
UMLEdgeTypePatterns
static std::istream & operator>>(std::istream &inStream, HyperGraph::NodeArray< T > &array)
Definition: HyperGraph.h:814
UMLEdgeTypeConstants
UMLEdgeTypeOffsets
ostream & operator<<(ostream &os, const ogdf::Array< E, INDEX > &a)
Prints array a to output stream os.
Definition: Array.h:764
The namespace for all OGDF objects.
long long edgeType
bool operator==(const Tuple2< E1, E2 > &t1, const Tuple2< E1, E2 > &t2)
Equality operator for 2-tuples.
Definition: tuples.h:75