public UmlClass(UmlBlock block) : base(block) { name = name.IfContains("class ", () => type = ClassType.Class); name = name.IfContains("struct ", () => type = ClassType.Struct); name = name.IfContains("interface ", () => type = ClassType.Interface); string[] p = name.Split(":"); if (p.Length == 2) { name = p [0].Trim(); bases = p [1].Trim().Split(",").TrimAll().ToArray(); if (bases.Length == 1 && bases [0].Length == 0) { bases = new string[] {} } ; } else { bases = new string[] {}; } Content = ParseContent(block.Content).ToArray(); string _name = name; Packages.SplitName(_name, out Packages.CurrentPackage, out name); Comments.AddTo(commentsKey = Comments.Key(name), block.comments); Packages.AddToCurrentPackage(name); }
public static string Key(string _name1, string name2) { string dummy = ""; string name1 = ""; Packages.SplitName(_name1, out dummy, out name1); return(name1 + "." + name2); }
public static string Key(string _name) { string dummy = ""; string name = ""; Packages.SplitName(_name, out dummy, out name); return(name); }
public UmlEnum(UmlBlock block) : base(block) { name = name.IfContains("enum ", () => {}); values = ParseContent(block.Content).ToArray(); string _name = name; Packages.SplitName(_name, out Packages.CurrentPackage, out name); Comments.AddTo(commentsKey = Comments.Key(name), block.comments); Packages.AddToCurrentPackage(name); }