public void DerivedInheritanceLinesFromDiagram(ClassFigure baseFigure) { if (baseFigure == null) { throw new ArgumentNullException ("baseFigure"); } var lines = new List<InheritanceLine> (); foreach (var cf in Children.OfType<ClassFigure> ()) { if (cf.BaseDecoratedFullName == baseFigure.DecoratedFullName) { lines.Add (new InheritanceLine (cf, baseFigure)); } } lines.ForEach(line => Add (line)); }
private void DeserializeType(XElement typeInfo, ProjectDom dom) { TypeFigure figure; switch (typeInfo.Name.ToString ()) { case "Class": figure = new ClassFigure(); break; case "Struct": figure = new StructFigure(); break; case "Enum": figure = new EnumFigure(); break; case "Interface": figure = new InterfaceFigure(); break; case "Delegate": figure = new DelegateFigure(); break; default: throw new DeserializationException ("Unknown type: " + typeInfo.Name); } figure.Deserialize (typeInfo, dom); Add (figure); figure.AcceptVisitor (new GroupFormatVisitor (Grouping)); // TODO: do something about Associations here... // make sure to check if the other figure has been loaded yet or not and then act accordingly... }
public void BaseInheritanceLineFromDiagram(ClassFigure derivedFigure) { if (derivedFigure == null) { throw new ArgumentNullException ("derivedFigure"); } var baseFigure = GetTypeFigure (derivedFigure.BaseDecoratedFullName) as ClassFigure; if (baseFigure != null) { Add (new InheritanceLine (derivedFigure, baseFigure)); } }