|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
67 template<
class coordType>
80 : m_usedLabels(usedLabels), m_edge(e) {
81 for (
int i = 0; i < m_numberLabelTypes; i++) {
92 EdgeLabel(
edge e, coordType w[], coordType h[],
int usedLabels = numberUsedLabels)
93 : m_usedLabels(usedLabels), m_edge(e) {
94 for (
int i = 0; i < m_numberLabelTypes; i++) {
103 : m_usedLabels(usedLabels), m_edge(e) {
104 for (
int i = 0; i < m_numberLabelTypes; i++) {
105 if (m_usedLabels & (1 << i)) {
116 for (
int i = 0; i < m_numberLabelTypes; i++) {
117 m_xPos[i] = rhs.
m_xPos[i];
118 m_yPos[i] = rhs.
m_yPos[i];
132 for (i = 0; i < m_numberLabelTypes; i++) {
133 m_xPos[i] = rhs.
m_xPos[i];
134 m_yPos[i] = rhs.
m_yPos[i];
150 for (
int i = 0; i < m_numberLabelTypes; i++) {
152 m_xPos[i] = rhs.
m_xPos[i];
153 m_yPos[i] = rhs.
m_yPos[i];
163 void setX(
LabelType elt, coordType x) { m_xPos[
static_cast<int>(elt)] = x; }
165 void setY(
LabelType elt, coordType y) { m_yPos[
static_cast<int>(elt)] = y; }
176 coordType
getX(
LabelType elt)
const {
return m_xPos[
static_cast<int>(elt)]; }
178 coordType
getY(
LabelType elt)
const {
return m_yPos[
static_cast<int>(elt)]; }
187 return (m_usedLabels & (1 <<
static_cast<int>(elt))) > 0;
197 coordType m_xPos[m_numberLabelTypes];
198 coordType m_yPos[m_numberLabelTypes];
201 coordType m_xSize[m_numberLabelTypes];
202 coordType m_ySize[m_numberLabelTypes];
217 template<
class coordType>
The namespace for all OGDF objects.
Stores additional attributes of a graph (like layout information).
Declaration of class GraphAttributes which extends a Graph by additional attributes.
ELabelInterface(GraphAttributes ¨)
Includes declaration of graph class.
ELabelInterface(PlanRepUML &pru)
coordType getHeight(LabelType elt) const
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
Planarized representation (of a connected component) of a UMLGraph; allows special handling of hierar...
void setY(LabelType elt, coordType y)
Declaration of class PlanRepUML.
GraphAttributes & graph()
EdgeLabel(edge e, coordType w, coordType h, int usedLabels)
coordType getHeight(edge e, LabelType elt)
coordType m_yPos[m_numberLabelTypes]
coordType getX(LabelType elt) const
EdgeLabel & operator|=(const EdgeLabel &rhs)
void setHeight(LabelType elt, coordType h)
const Graph & constGraph() const
Returns a reference to the associated graph.
@ NumLabels
the number of available labels at an edge
coordType m_ySize[m_numberLabelTypes]
EdgeLabel< coordType > & getLabel(edge e)
Decralation of GraphElement and GraphList classes.
EdgeLabel & operator=(const EdgeLabel &rhs)
void setWidth(LabelType elt, coordType w)
void addType(LabelType elt)
coordType getWidth(LabelType elt) const
EdgeLabel(const EdgeLabel &rhs)
EdgeArray< EdgeLabel< coordType > > m_labels
coordType & minFeatDist()
coordType & distDefault()
EdgeLabel(edge e, coordType w[], coordType h[], int usedLabels=numberUsedLabels)
void addLabel(const edge &e, const EdgeLabel< coordType > &el)
coordType getY(LabelType elt) const
internal::GraphObjectContainer< EdgeElement > edges
The container containing all edge objects.
Basic declarations, included by all source files.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Class for the representation of edges.
void setX(LabelType elt, coordType x)
coordType m_xPos[m_numberLabelTypes]
coordType getWidth(edge e, LabelType elt)
int randomNumber(int low, int high)
Returns random integer between low and high (including).
EdgeLabel(edge e, int usedLabels=numberUsedLabels)
coordType m_xSize[m_numberLabelTypes]
bool usedLabel(LabelType elt) const
const Graph & original() const
Returns a reference to the original graph.
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
void setLabel(const edge &e, const EdgeLabel< coordType > &el)