11 #ifndef ROOT_RDF_GRAPHNODE
12 #define ROOT_RDF_GRAPHNODE
24 namespace GraphDrawing {
26 class GraphCreatorHelper;
39 friend class GraphCreatorHelper;
42 unsigned int fCounter;
44 std::string fName, fColor, fShape;
45 std::vector<std::string>
48 std::shared_ptr<GraphNode> fPrevNode;
50 bool fIsExplored =
false;
57 static unsigned int &GetStaticGlobalCounter()
59 static unsigned int sGlobalCounter = 1;
60 return sGlobalCounter;
66 GraphNode(
const std::string_view &name) : fName(name) { fCounter = GetStaticGlobalCounter()++; }
71 static void ClearCounter() { GraphNode::GetStaticGlobalCounter() = 1; }
75 void SetPrevNode(
const std::shared_ptr<GraphNode> &node) { fPrevNode = node; }
79 void AddDefinedColumns(
const std::vector<std::string> &columns) { fDefinedColumns = columns; }
83 std::vector<std::string> GetDefinedColumns() {
return fDefinedColumns; }
88 void SetCounter(
unsigned int counter) { fCounter = counter; }
92 void SetIsExplored(
bool isExplored) { fIsExplored = isExplored; }
96 void SetIsNew(
bool isNew) { fIsNew = isNew; }
98 bool GetIsNew() {
return fIsNew; }
134 void SetAction(
bool hasRun)