heavy restructuring with smart pointers, not finished
This commit is contained in:
+30
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
|
||||
#include "graph-item.h"
|
||||
#include <memory>
|
||||
|
||||
class Node;
|
||||
|
||||
class Edge : public GraphItem{
|
||||
|
||||
public:
|
||||
Edge(std::shared_ptr<Node> start, std::shared_ptr<Node> end) : start(start), end(end) {}
|
||||
|
||||
std::shared_ptr<Node> start;
|
||||
std::shared_ptr<Node> end;
|
||||
|
||||
bool pass_forward = true;
|
||||
bool pass_backward = true;
|
||||
|
||||
bool active = false;
|
||||
bool remove = false;
|
||||
bool config = false;
|
||||
bool split = false;
|
||||
|
||||
float connector_offset = 8.0f;
|
||||
float switches_offset = 25.0f;
|
||||
|
||||
std::shared_ptr<Node> getNextNode(std::shared_ptr<Node> origin){
|
||||
return start == origin ? end : start;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user