Exemple #1
0
        public UmlAttribute(Tag tag, UmlClass classobj)
            : base(tag)
        {
            type = tag.ParseType ();

            commentsKey = Comments.Key (classobj.Name, name);
        }
Exemple #2
0
 public UmlObject(Tag tag)
     : this(tag.Name)
 {
     Publicity = Publicity.Public;
     if (tag.Params.ContainsKey ("visibility")) {
         if (tag.Params ["visibility"].ToLower () == "private")
             Publicity = Publicity.Private;
         else if (tag.Params ["visibility"].ToLower () == "protected")
             Publicity = Publicity.Protected;
     }
     if (tag.TrueParams.Contains("static"))
         Virtuality = CSharpUML.Virtuality.Static;
 }
Exemple #3
0
        public UmlEnum(Tag tag)
            : base(tag)
        {
            name = tag.Params ["name"];

            tag.Content = tag.Content.Replace (" = ", "=");
            Tag[] literalTags = VSParser.ExtractTags (ref tag.Content, "enumerationLiteral");

            List<string> literals = new List<string> ();
            foreach (Tag literalTag in literalTags) {
                if (literalTag.Params.ContainsKey ("name")) {
                    literals.Add (literalTag.Params ["name"]);
                } else {
                    Console.WriteLine ("weird: " + literalTag.Content);
                }
            }
            values = literals.ToArray ();

            commentsKey = Comments.Key (name);
            Packages.AddToCurrentPackage (name);
        }
Exemple #4
0
        public UmlMethod(Tag tag, UmlClass classobj)
            : base(tag)
        {
            Tag[] paramtags = VSParser.ExtractTags (ref tag.Content, "parameter");

            returntype = "void";

            List<string> parameterlist = new List<string> ();
            foreach (Tag proptag in paramtags) {
                string type = proptag.ParseType ();
                if (proptag.Params.ContainsKey ("direction") && proptag.Params ["direction"].ToLower () == "return") {
                    returntype = type;
                } else {
                    if (type == "void")
                        parameterlist.Add (proptag.Name);
                    else
                        parameterlist.Add (type + " " + proptag.Name);
                }
            }
            parameters = parameterlist.ToArray ();

            commentsKey = Comments.Key (classobj.Name, name, parameters.Unique () + returntype);
        }