public BaseGraphCommand(string fromNodeName, string fromAnchorFieldName, string toNodeName, string toAnchorFieldName) { this.type = BaseGraphCommandType.LinkAnchorName; this.fromNodeName = fromNodeName; this.fromAnchorFieldName = fromAnchorFieldName; this.toNodeName = toNodeName; this.toAnchorFieldName = toAnchorFieldName; }
//new link with anchor index constructor public BaseGraphCommand(string fromNodeName, int fromAnchorIndex, string toNodeName, int toAnchorIndex) { this.type = BaseGraphCommandType.LinkAnchor; this.fromNodeName = fromNodeName; this.fromAnchorIndex = fromAnchorIndex; this.toNodeName = toNodeName; this.toAnchorIndex = toAnchorIndex; }
//New node constructor public BaseGraphCommand(Type nodeType, string name, string attributes = null) { this.type = BaseGraphCommandType.NewNode; this.nodeType = nodeType; this.name = name; this.forcePositon = false; this.attributes = attributes; }
//New node with position constructor public BaseGraphCommand(Type nodeType, string name, Vector2 position, string attributes = null) { this.type = BaseGraphCommandType.NewNodePosition; this.nodeType = nodeType; this.name = name; this.position = position; this.forcePositon = true; this.attributes = attributes; }
//Graph attribute public BaseGraphCommand(string fieldName, object value) { this.type = BaseGraphCommandType.GraphAttribute; this.graphFieldName = fieldName; this.graphFieldValue = value; }
//new link constructor public BaseGraphCommand(string fromNodeName, string toNodeName) { this.type = BaseGraphCommandType.Link; this.fromNodeName = fromNodeName; this.toNodeName = toNodeName; }