-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(util): Add GraphViz helper types (#3635)
- Loading branch information
1 parent
76a8f79
commit 4aa7d19
Showing
5 changed files
with
452 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
// This file is part of the Acts project. | ||
// | ||
// Copyright (C) 2024 CERN for the benefit of the Acts project | ||
// | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
#pragma once | ||
|
||
#include <ostream> | ||
#include <vector> | ||
|
||
namespace Acts::GraphViz { | ||
|
||
enum class Shape { | ||
Box, | ||
Polygon, | ||
Ellipse, | ||
Oval, | ||
Circle, | ||
Point, | ||
Egg, | ||
Triangle, | ||
Plaintext, | ||
Plain, | ||
Diamond, | ||
Trapezium, | ||
Parallelogram, | ||
House, | ||
Pentagon, | ||
Hexagon, | ||
Septagon, | ||
Octagon, | ||
DoubleCircle, | ||
DoubleOctagon, | ||
TripleOctagon, | ||
InvTriangle, | ||
InvTrapezium, | ||
InvHouse, | ||
Mdiamond, | ||
Msquare, | ||
Mcircle, | ||
Rect, | ||
Rectangle, | ||
Square, | ||
Star, | ||
None, | ||
Underline, | ||
Cylinder, | ||
Note, | ||
Tab, | ||
Folder, | ||
Box3d, | ||
Component, | ||
Promoter, | ||
Cds, | ||
Terminator, | ||
Utr, | ||
PrimerSite, | ||
RestrictionSite, | ||
FivePOverhang, | ||
ThreePOverhang, | ||
NOverhang, | ||
Assembly, | ||
Signature, | ||
Insulator, | ||
Ribosite, | ||
RNAStab, | ||
ProteaseSite, | ||
ProteinStab, | ||
RPromoter, | ||
RArrow, | ||
LArrow, | ||
LPromoter | ||
}; | ||
|
||
std::ostream& operator<<(std::ostream& os, const Shape& shape); | ||
|
||
enum class Style { | ||
Filled, | ||
Invisible, | ||
Diagonals, | ||
Rounded, | ||
Dashed, | ||
Dotted, | ||
Solid, | ||
Bold | ||
}; | ||
|
||
std::ostream& operator<<(std::ostream& os, const Style& style); | ||
|
||
struct Node { | ||
std::string id; | ||
std::string label; | ||
Shape shape = Shape::Ellipse; | ||
std::vector<Style> style = {Style::Solid}; | ||
}; | ||
|
||
std::ostream& operator<<(std::ostream& os, const Node& node); | ||
|
||
struct Edge { | ||
Node from; | ||
Node to; | ||
Style style = Style::Solid; | ||
}; | ||
|
||
std::ostream& operator<<(std::ostream& os, const Edge& node); | ||
|
||
} // namespace Acts::GraphViz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,5 @@ target_sources( | |
TrackHelpers.cpp | ||
BinningType.cpp | ||
Intersection.cpp | ||
GraphViz.cpp | ||
) |
Oops, something went wrong.